Hey guys,
I want to make a script that wenn you open a cabinet a flying jesus (like here
http://wiki.frictionalgames.com/hpl2/tut...iferorange)
comes out. But the problem is i dunno how to use timers, because if i open it he shouldn´t fly throw the cabinet door, so the timer should have sth like 0.5 seconds. I know that i have to use
void AddTimer(string& asName, float afTime, string& asFunction);
but don´t know how. can someone pls explain? thx
Void OnStart()
{
SetEntityPlayerInteractCallback("Cabinet_Jesus", "Cabinet_Jesus_Func", false);
}
void Cabinet_Jesus_Func(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Jesus_2", true);
AddPropForce("Jesus_2", -30000, 0, 0, "World");
PlaySoundAtEntity("Scream_1", "scream_1.ogg", "Player", 0.0f, false);
}