void OnStart()
{
SetLampLit("BoxLight_1", false); //turn light off
AddTimer("LightOn", 12.0, "Lightning");
}
void Lightning(string &in asTimer);
{
if(asTimer == "LightOn")
{
SetLampLit("BoxLight_1", true);
//for variety, you could RandFloat(); here, and call it in timer.
AddTimer("LightOff", 0.2f, "Lightning");
AddTimer("Thunder", 2.9f, "Lightning");
}
elseif(asTimer == "LightOff")
{
SetLampLit("BoxLight_1", false);
}
elseif(asTimer == "Thunder")
{
//Place Thunder sound(s) here.
//Would be a great idea to RandFloat here. So you can
//randomly have another thunder sequence start.
//Here's one you can test, not sure if it will error.
//Forgotten how to RandFloat(); and can't check Engine Scripts now. P:
//AddTimer("LightOn", RandFloat(25.0f, 55.0f), "Lightning");
AddTimer("LightOn", 41.0f, "Lightning");
}