(06-09-2012, 05:30 PM)Datguy5 Wrote: Try this:
void OnStart()
{
SetEntityCallbackFunc("monster_oil", "OnPickup");
}
void OnPickup(string &in asEntity, string &in type)
{
SetEntityActive("servant_brute_1", true);
}
I hope this explains something.
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 tried that and still nothing happens when i pickup the oil, i dont think it's script that there's something wrong with. Its like the game ignores the script, i've tried several basic scripts, like spawning with a lantern in the inventory and even that wont work.
:EDIT: I had forgotten to save as "all types" and i changed that and i just SH*T myself cause ur script worked and i got punched in the face! Thanks!