Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how do timers work?
ApeCake Offline
Member

Posts: 116
Threads: 20
Joined: Jun 2012
Reputation: 4
#3
RE: how do timers work?

Yeah as far as I understand your question I think AddEntityCollideCallback is better. That way the player will probably notice the torches going on unlike timers (the player could be looking at a wall and the function would activate after a time and (s)he maybe wouldn't notice the torches going lit).
This should be the script:

void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "NameofFunction", false, 1);

// you can set false to true if you want it to delete after the first time.
}


void NameofFunction(string &in asParent, string &in asChild, int alState)
{
SetLampLit("NameofTorch", true, true);
}

I'm pretty sure that should work.
07-31-2012, 10:45 AM
Find


Messages In This Thread
how do timers work? - by Soverain - 07-31-2012, 04:49 AM
RE: how do timers work? - by Mackiiboy - 07-31-2012, 09:56 AM
RE: how do timers work? - by ApeCake - 07-31-2012, 10:45 AM
RE: how do timers work? - by Soverain - 07-31-2012, 08:49 PM
RE: how do timers work? - by Mackiiboy - 07-31-2012, 09:02 PM
RE: how do timers work? - by FlawlessHappiness - 07-31-2012, 08:58 PM
RE: how do timers work? - by Soverain - 07-31-2012, 09:51 PM



Users browsing this thread: 1 Guest(s)