RE: How to make a "Wait" in the script.
Hey, thank you very much for your fast reply.
It now looks like this:
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")
{
SetLampLit("candlestick_3", true, true);
SetLampLit("candlestick_4", true, true);
}
if(asTimer == "light2")
{
SetLampLit("candlestick_5", true, true);
SetLampLit("candlestick_6", true, true);
}
if(asTimer == "stopeffects")
{
StopPlayerLookAt();
}
}
Unfortunately the other lamps won't light. Did I do something wrong? Did I forget something?
Greets
-iFondue
|