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
[Solved]Help i don't know how to use Timers
Viperdream Offline
Member

Posts: 124
Threads: 16
Joined: Jan 2011
Reputation: 0
#4
RE: Help i don't know how to use Timers

void CollideScaryArea(string &in asParent, string &in asChild, int alState)
{
    SetSwingDoorLocked("SuperDoor", true, true);
    PlaySoundAtEntity("", "break_wood", "SuperDoor",0,false);
    PlaySoundAtEntity("", "react_pant", "Player",0,false);
    PlayGuiSound("insanity_monster_roar01.ogg", 1.0f);
    GiveSanityDamage(25, true);
    StartPlayerLookAt("SuperDoor", 7, 6, "");
        AddTimer("Boo", 0.2f, "PeekaBooTimer"); //This only links to "PeekaBooTimer"
}    
void PeekaBooTimer(string &in asTimer)
//Put the stuff you want done in a seperate place, away from OnStart or any other stuff with void in front of it.
{
StopPlayerLookAt();
}
See what I did there? Don't put the stuff you want to get done in the AddTimer, since that only links to the timer you created.

(This post was last modified: 03-17-2011, 12:41 AM by Viperdream.)
03-17-2011, 12:39 AM
Find


Messages In This Thread
RE: Help i don't know how to use Timers - by Viperdream - 03-17-2011, 12:39 AM



Users browsing this thread: 1 Guest(s)