Jump to content

AddAction to ghost


Recommended Posts

So I'm trying to make it so that a ghost can perform a custom action. The problem is, the examples I've seen of:

 

AddAction(ID, str, function)

 

Only adds the action to living players. Is there a special method to add an action to a ghost? Does addaction have to be called when a player dies? 

 

Thanks!

Link to comment
Share on other sites

AddAction returns the action.

local myaction = AddAction("ACTID", "Do Act", fn)

You then put

myaction.ghost_valid = falsemyaction.ghost_exclusive = false

parameters you can edit.

 

ghost_valid = true if a ghost and a player have the action.

ghost_exclusive = true if only ghosts have the action.

 

If ghost_exclusive is true, then ghost_valid should be true.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...