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
Script Help How to make a "Wait" in the script.
Putmalk Offline
Senior Member

Posts: 290
Threads: 13
Joined: Apr 2012
Reputation: 15
#2
RE: How to make a "Wait" in the script.

Here's how I would do it:

void LightOn(string &in asParent, string &in asChild, int alStat)
{
      AddEntityCollideCallback("Player" , "ScriptArea_1" , "LightOn" , true , 1);
    
    StartPlayerLookAt("LookFrame", 20, 50, "");
    
    SetLampLit("candlestick_1", true, true);
    
    SetLampLit("candlestick_2", true, true);
      

      AddTimer("light1", 0.5f, "TimerLight");
      AddTimer("light2", 1, "TimerLight");
      AddTimer("stopeffects", 1.2f, "TimerLight");

}

void TimerLight(string &in asTimer)
{

       if(asTimer == "light1")
       {
            //Light Lamp 3 and 4 (SetLampLit);
       }
       if(asTimer == "light2")
       {
            //Light Lamp 4 and 5 (SetLampLit)
       }
       if(asTimer == "stopeffects")
       {
            StopPlayerLookAt();
       }
}

04-10-2012, 05:20 PM
Find


Messages In This Thread
How to make a "Wait" in the script. - by iFondue - 04-10-2012, 05:13 PM
RE: How to make a "Wait" in the script. - by Putmalk - 04-10-2012, 05:20 PM



Users browsing this thread: 2 Guest(s)