TheIcyPickle
Member
Posts: 80
Threads: 16
Joined: Feb 2011
Reputation:
0
|
Setting an Entity Active
SetEntityCallbackFunc("lantern", "SetEntityActive"); (so when player picks up lantern, entity is set active (pretty sure this is right)
void SetEntityActive(string &in asEntity, string &in type)
{
SetEntityActive("monster1", "OnPickup");
SetEntityActive("monster2", "OnPickup");
}
that is what the script page seemed like it was saying.. here it is for reference:
void SetEntityCallbackFunc(string& asName, string& asCallback);
Calls a function when the player interacts with a certain entity.
Callback syntax: void MyFunc(string &in asEntity, string &in type)
Type depends on entity type and includes: “OnPickup”, “Break”, “OnIgnite”, etc
I think my callback syntax is messed up, but I don't know!
SetEntityCallbackFunc("lantern", "OnPickup");
void OnPickup(string &in asEntity, string &in type)
{
SetEntityActive("monster1", true);
ShowEnemyPlayerPosition("monster1");
SetEntityActive("monster2", true);
ShowEnemyPlayerPosition("monster2");
}
this should be a bit better, but it still won't work.
(This post was last modified: 06-02-2012, 07:27 AM by TheIcyPickle.)
|
|
06-02-2012, 06:31 AM |
|