The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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.
iFondue Offline
Junior Member

Posts: 28
Threads: 6
Joined: Apr 2012
Reputation: 0
#1
How to make a "Wait" in the script.

Hello, I'm pretty new to this forum and i have a question. Huh


I already searched in the forum for answers, but I didn't find anything.
I know that the title is a little complicated, but I am going to explain what I mean... Blush

Idea: I am working on a custom story for a week now, but now I am stuck at this problem. I made the player look at the corridor (StartPlayerLookAt). Now I want to light always 2 lamps, lamp after lamp when i enter "ScriptArea_1". But i want that between the lightning of the lamps is always like 0.5 seconds...

I know that i have to do that with a timer (I think? Big Grin), but I don't know how....

Could someone expain? Tongue


This is my script:


Run when entering map
void OnEnter()

{
AddEntityCollideCallback("Player" , "ScriptArea_1" , "LightOn" , true , 1);
}


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

Wait 0.5 Seconds

Light Lamp 3 and 4 (SetLampLit)

Wait 0.5 Seconds

Light Lamp 4 and 5
(SetLampLit)

.......

StopPlayerLookAt();
}

I think you got the idea... ?


Greets

-iFondue
04-10-2012, 05:13 PM
Find


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



Users browsing this thread: 1 Guest(s)