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
Need Some Scripting Help Please!
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#5
RE: Need Some Scripting Help Please!

I believe it is better to put the timers into 1 function, but I hope I don't confuse you. :/

void OnStart()
{
     AddTimer("T1", 5, "TimerFunction");
     AddTimer("T2", 7, "TimerFunction");
     AddTimer("T3", 10, "TimerFunction");
}
void TimerFunction(string &in asTimer)
{
     string x = asTimer;
     if (x == "T1")
     {
          GiveSanityDamage(20, true);
          StartPlayerLookAt("Door1:, 3, 5, "");
          return;
     }
     else if (x == "T2")
     {
          StopPlayerLookAt();
          return;
     }
     else if (x == "T3")
     {
          
          return;
     }
}

By the way, you don't need a "void OnEnter()" or a "void OnLeave()". I hope this helps. Smile

06-25-2011, 07:33 PM
Find


Messages In This Thread
Need Some Scripting Help Please! - by KikoKuruma - 06-25-2011, 07:17 PM
RE: Need Some Scripting Help Please! - by Kyle - 06-25-2011, 07:33 PM
RE: Need Some Scripting Help Please! - by Kyle - 06-25-2011, 07:44 PM



Users browsing this thread: 1 Guest(s)