Hello, I'm pretty new to this forum and i have a question.
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...
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?
), but I don't know how....
Could someone expain?
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