Frictional Games Forum (read-only)
AddTimer infinite loop (fixed) :) - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: AddTimer infinite loop (fixed) :) (/thread-12220.html)



AddTimer infinite loop (fixed) :) - jssjr90 - 12-31-2011

Ok now for some reason the Thunderstom lightning fx is stuck on some infinite loop. Once the script for the thunderstorm fx starts ,when it reaches its end for "Bang 1 Series" code and not continuing on to the next series of lightning fx, it just loops back from the start of Bang 1 series over and over. Can anybody help? Here is the script. Warning, vary long.

Code:
////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("Player", "Wakeup", "Wakeupfunc", true, 1);
}


//Wake up scene
void Wakeupfunc(string &in asParent, string &in asChild, int alState)
{
SetPlayerActive(false);
FadeIn(5);
StartPlayerLookAt("look1", 0.2, 1, "");
MovePlayerHeadPos( 0, -1.3, 0, 10, 0.10f);
AddTimer("", 10.0f, "look2");
}
void look2(string &in asTimer)
{
StartPlayerLookAt("look2", 0.2, 1, "");
AddTimer("", 10.0f, "Control");
FadeOut(10);
}
void Control(string &in asTimer)
{
MovePlayerHeadPos( 0, 0, 0, 10, 0.10f);
StopPlayerLookAt();
FadeIn(3);
TeleportPlayer("Wakearea");
SetPlayerActive(true);
}





void OnEnter()
{
SetEntityPlayerInteractCallback("Thaughts14", "Thaughts14func", false);
SetEntityPlayerInteractCallback("painting14", "painting14func", false);
SetEntityPlayerInteractCallback("painting15", "painting15func", false);
SetEntityPlayerInteractCallback("painting16", "painting16func", false);
SetEntityPlayerInteractCallback("painting18", "painting18func", false);
SetEntityPlayerInteractCallback("painting17", "painting17func", false);
SetEntityPlayerInteractCallback("Thaughts1", "Thaughts1func", false);
SetEntityPlayerInteractCallback("Thaughts2", "Thaughts2func", false);
SetEntityPlayerInteractCallback("Thaughts3", "Thaughts3func", false);
SetEntityPlayerInteractCallback("Thaughts4", "Thaughts4func", false);
SetEntityPlayerInteractCallback("Thaughts5", "Thaughts5func", false);
SetEntityPlayerInteractCallback("Thaughts6", "Thaughts6func", false);
SetEntityPlayerInteractCallback("Thaughts7", "Thaughts7func", false);
SetEntityPlayerInteractCallback("Thaughts8", "Thaughts8func", false);
SetEntityPlayerInteractCallback("Thaughts9", "Thaughts9func", false);
SetEntityPlayerInteractCallback("Thaughts10", "Thaughts10func", false);
SetEntityPlayerInteractCallback("Thaughts11", "Thaughts11func", false);
SetEntityPlayerInteractCallback("Thaughts12", "Thaughts12func", false);
SetEntityPlayerInteractCallback("Thaughts13", "Thaughts13func", false);
SetEntityPlayerInteractCallback("Thaughts15", "Thaughts15func", false);
SetEntityPlayerInteractCallback("Thaughts16", "Thaughts16func", false);
SetEntityPlayerInteractCallback("Thaughts17", "Thaughts17func", false);
SetEntityPlayerInteractCallback("Thaughts18", "Thaughts18func", false);
//Cant go to bed until I complete tasks///////////////////////////////
//SetEntityPlayerInteractCallback("Thaughts50", "Thaughts50func", false);
///////////////////////////////////////////////////////////////////////

//THUNDER LIGHT ENGINE
//Bang timer guide
//Bang 1 - 19.44 sec
//Bang 2 - 18.18 sec
//Bang 3 - 28.77 sec
//Bang 4 - 18.31 sec
//Bang 5 - 51.88 sec
//Bang 6 - 62.24 sec
//Bang 7 - 68.26 sec
//Bang 8 - 50.7 sec
//Bang 9 - 64.69 sec
//Bang 10 - 12.44 sec







//____________BANG 1 SERIES____________________


SetLightVisible("thunder1", false);
SetLightVisible("thunder2", false);
SetLightVisible("thunder3", false);
SetLightVisible("thunder4", false);
SetLightVisible("thunder5", false);
SetLightVisible("thunder6", false);
SetLightVisible("thunder7", false);
SetLightVisible("thunder8", false);
SetLightVisible("thunder9", false);
SetLightVisible("thunder10", false);
SetLightVisible("thunder11", false);
SetLightVisible("thunder12", false);
SetLightVisible("thunder13", false);
SetLightVisible("thunder14", false);
SetLightVisible("thunder15", false);
SetLightVisible("thunder16", false);
SetLightVisible("thunder17", false);
SetLightVisible("thunder18", false);
SetLightVisible("thunder19", false);
SetLightVisible("thunder20", false);
SetLightVisible("thunder21", false);
SetLightVisible("thunder22", false);
SetLightVisible("thunder23", false);
AddTimer("", 19.0f,"Bang1on");
}


void Bang1on(string &in asTimer)
{
SetLightVisible("thunder1", true);
SetLightVisible("thunder2", true);
SetLightVisible("thunder3", true);
SetLightVisible("thunder4", true);
SetLightVisible("thunder5", true);
SetLightVisible("thunder6", true);
SetLightVisible("thunder7", true);
SetLightVisible("thunder8", true);
SetLightVisible("thunder9", true);
SetLightVisible("thunder10", true);
SetLightVisible("thunder11", true);
SetLightVisible("thunder12", true);
SetLightVisible("thunder13", true);
SetLightVisible("thunder14", true);
SetLightVisible("thunder15", true);
SetLightVisible("thunder16", true);
SetLightVisible("thunder17", true);
SetLightVisible("thunder18", true);
SetLightVisible("thunder19", true);
SetLightVisible("thunder20", true);
SetLightVisible("thunder21", true);
SetLightVisible("thunder22", true);
SetLightVisible("thunder23", true);
AddTimer("", 0.37f,"Bang1off");
}
void Bang1off(string &in asTimer)
{
SetLightVisible("thunder1", false);
SetLightVisible("thunder2", false);
SetLightVisible("thunder3", false);
SetLightVisible("thunder4", false);
SetLightVisible("thunder5", false);
SetLightVisible("thunder6", false);
SetLightVisible("thunder7", false);
SetLightVisible("thunder8", false);
SetLightVisible("thunder9", false);
SetLightVisible("thunder10", false);
SetLightVisible("thunder11", false);
SetLightVisible("thunder12", false);
SetLightVisible("thunder13", false);
SetLightVisible("thunder14", false);
SetLightVisible("thunder15", false);
SetLightVisible("thunder16", false);
SetLightVisible("thunder17", false);
SetLightVisible("thunder18", false);
SetLightVisible("thunder19", false);
SetLightVisible("thunder20", false);
SetLightVisible("thunder21", false);
SetLightVisible("thunder22", false);
SetLightVisible("thunder23", false);
AddTimer("", 0.17f,"Bang1on2");
}
void Bang1on2(string &in asTimer)
{
SetLightVisible("thunder1", true);
SetLightVisible("thunder2", true);
SetLightVisible("thunder3", true);
SetLightVisible("thunder4", true);
SetLightVisible("thunder5", true);
SetLightVisible("thunder6", true);
SetLightVisible("thunder7", true);
SetLightVisible("thunder8", true);
SetLightVisible("thunder9", true);
SetLightVisible("thunder10", true);
SetLightVisible("thunder11", true);
SetLightVisible("thunder12", true);
SetLightVisible("thunder13", true);
SetLightVisible("thunder14", true);
SetLightVisible("thunder15", true);
SetLightVisible("thunder16", true);
SetLightVisible("thunder17", true);
SetLightVisible("thunder18", true);
SetLightVisible("thunder19", true);
SetLightVisible("thunder20", true);
SetLightVisible("thunder21", true);
SetLightVisible("thunder22", true);
SetLightVisible("thunder23", true);
AddTimer("", 0.24f,"Bang1off2");
}
void Bang1off2(string &in asTimer)
{
SetLightVisible("thunder1", false);
SetLightVisible("thunder2", false);
SetLightVisible("thunder3", false);
SetLightVisible("thunder4", false);
SetLightVisible("thunder5", false);
SetLightVisible("thunder6", false);
SetLightVisible("thunder7", false);
SetLightVisible("thunder8", false);
SetLightVisible("thunder9", false);
SetLightVisible("thunder10", false);
SetLightVisible("thunder11", false);
SetLightVisible("thunder12", false);
SetLightVisible("thunder13", false);
SetLightVisible("thunder14", false);
SetLightVisible("thunder15", false);
SetLightVisible("thunder16", false);
SetLightVisible("thunder17", false);
SetLightVisible("thunder18", false);
SetLightVisible("thunder19", false);
SetLightVisible("thunder20", false);
SetLightVisible("thunder21", false);
SetLightVisible("thunder22", false);
SetLightVisible("thunder23", false);
AddTimer("", 0.24f,"Bang1on3");
}
void Bang1on3(string &in asTimer)
{
SetLightVisible("thunder1", true);
SetLightVisible("thunder2", true);
SetLightVisible("thunder3", true);
SetLightVisible("thunder4", true);
SetLightVisible("thunder5", true);
SetLightVisible("thunder6", true);
SetLightVisible("thunder7", true);
SetLightVisible("thunder8", true);
SetLightVisible("thunder9", true);
SetLightVisible("thunder10", true);
SetLightVisible("thunder11", true);
SetLightVisible("thunder12", true);
SetLightVisible("thunder13", true);
SetLightVisible("thunder14", true);
SetLightVisible("thunder15", true);
SetLightVisible("thunder16", true);
SetLightVisible("thunder17", true);
SetLightVisible("thunder18", true);
SetLightVisible("thunder19", true);
SetLightVisible("thunder20", true);
SetLightVisible("thunder21", true);
SetLightVisible("thunder22", true);
SetLightVisible("thunder23", true);
AddTimer("", 0.17f,"Bang1off3");
}
void Bang1off3(string &in asTimer)
{
SetLightVisible("thunder1", false);
SetLightVisible("thunder2", false);
SetLightVisible("thunder3", false);
SetLightVisible("thunder4", false);
SetLightVisible("thunder5", false);
SetLightVisible("thunder6", false);
SetLightVisible("thunder7", false);
SetLightVisible("thunder8", false);
SetLightVisible("thunder9", false);
SetLightVisible("thunder10", false);
SetLightVisible("thunder11", false);
SetLightVisible("thunder12", false);
SetLightVisible("thunder13", false);
SetLightVisible("thunder14", false);
SetLightVisible("thunder15", false);
SetLightVisible("thunder16", false);
SetLightVisible("thunder17", false);
SetLightVisible("thunder18", false);
SetLightVisible("thunder19", false);
SetLightVisible("thunder20", false);
SetLightVisible("thunder21", false);
SetLightVisible("thunder22", false);
SetLightVisible("thunder23", false);
AddTimer("", 0.27f,"Bang1on4");
}
void Bang1on4(string &in asTimer)
{
SetLightVisible("thunder1", true);
SetLightVisible("thunder2", true);
SetLightVisible("thunder3", true);
SetLightVisible("thunder4", true);
SetLightVisible("thunder5", true);
SetLightVisible("thunder6", true);
SetLightVisible("thunder7", true);
SetLightVisible("thunder8", true);
SetLightVisible("thunder9", true);
SetLightVisible("thunder10", true);
SetLightVisible("thunder11", true);
SetLightVisible("thunder12", true);
SetLightVisible("thunder13", true);
SetLightVisible("thunder14", true);
SetLightVisible("thunder15", true);
SetLightVisible("thunder16", true);
SetLightVisible("thunder17", true);
SetLightVisible("thunder18", true);
SetLightVisible("thunder19", true);
SetLightVisible("thunder20", true);
SetLightVisible("thunder21", true);
SetLightVisible("thunder22", true);
SetLightVisible("thunder23", true);
AddTimer("", 0.13f,"Bang1off4");
}
void Bang1off4(string &in asTimer)
{
SetLightVisible("thunder1", false);
SetLightVisible("thunder2", false);
SetLightVisible("thunder3", false);
SetLightVisible("thunder4", false);
SetLightVisible("thunder5", false);
SetLightVisible("thunder6", false);
SetLightVisible("thunder7", false);
SetLightVisible("thunder8", false);
SetLightVisible("thunder9", false);
SetLightVisible("thunder10", false);
SetLightVisible("thunder11", false);
SetLightVisible("thunder12", false);
SetLightVisible("thunder13", false);
SetLightVisible("thunder14", false);
SetLightVisible("thunder15", false);
SetLightVisible("thunder16", false);
SetLightVisible("thunder17", false);
SetLightVisible("thunder18", false);
SetLightVisible("thunder19", false);
SetLightVisible("thunder20", false);
SetLightVisible("thunder21", false);
SetLightVisible("thunder22", false);
SetLightVisible("thunder23", false);
AddTimer("", 18.18f,"Bang2on");
}


//_______BANG 2 SERIES_______________________________
void Bang2on(string &in asTimer)
{
SetLightVisible("thunder1", true);
SetLightVisible("thunder2", true);
SetLightVisible("thunder3", true);
SetLightVisible("thunder4", true);
SetLightVisible("thunder5", true);
SetLightVisible("thunder6", true);
SetLightVisible("thunder7", true);
SetLightVisible("thunder8", true);
SetLightVisible("thunder9", true);
SetLightVisible("thunder10", true);
SetLightVisible("thunder11", true);
SetLightVisible("thunder12", true);
SetLightVisible("thunder13", true);
SetLightVisible("thunder14", true);
SetLightVisible("thunder15", true);
SetLightVisible("thunder16", true);
SetLightVisible("thunder17", true);
SetLightVisible("thunder18", true);
SetLightVisible("thunder19", true);
SetLightVisible("thunder20", true);
SetLightVisible("thunder21", true);
SetLightVisible("thunder22", true);
SetLightVisible("thunder23", true);
AddTimer("", 0.37f,"Bang2off");
}
void Bang2off(string &in asTimer)
{
SetLightVisible("thunder1", false);
SetLightVisible("thunder2", false);
SetLightVisible("thunder3", false);
SetLightVisible("thunder4", false);
SetLightVisible("thunder5", false);
SetLightVisible("thunder6", false);
SetLightVisible("thunder7", false);
SetLightVisible("thunder8", false);
SetLightVisible("thunder9", false);
SetLightVisible("thunder10", false);
SetLightVisible("thunder11", false);
SetLightVisible("thunder12", false);
SetLightVisible("thunder13", false);
SetLightVisible("thunder14", false);
SetLightVisible("thunder15", false);
SetLightVisible("thunder16", false);
SetLightVisible("thunder17", false);
SetLightVisible("thunder18", false);
SetLightVisible("thunder19", false);
SetLightVisible("thunder20", false);
SetLightVisible("thunder21", false);
SetLightVisible("thunder22", false);
SetLightVisible("thunder23", false);
AddTimer("", 0.17f,"Bang2on2");
}
void Bang2on2(string &in asTimer)
{
SetLightVisible("thunder1", true);
SetLightVisible("thunder2", true);
SetLightVisible("thunder3", true);
SetLightVisible("thunder4", true);
SetLightVisible("thunder5", true);
SetLightVisible("thunder6", true);
SetLightVisible("thunder7", true);
SetLightVisible("thunder8", true);
SetLightVisible("thunder9", true);
SetLightVisible("thunder10", true);
SetLightVisible("thunder11", true);
SetLightVisible("thunder12", true);
SetLightVisible("thunder13", true);
SetLightVisible("thunder14", true);
SetLightVisible("thunder15", true);
SetLightVisible("thunder16", true);
SetLightVisible("thunder17", true);
SetLightVisible("thunder18", true);
SetLightVisible("thunder19", true);
SetLightVisible("thunder20", true);
SetLightVisible("thunder21", true);
SetLightVisible("thunder22", true);
SetLightVisible("thunder23", true);
AddTimer("", 0.24f,"Bang1off2");
}
void Bang2off2(string &in asTimer)
{
SetLightVisible("thunder1", false);
SetLightVisible("thunder2", false);
SetLightVisible("thunder3", false);
SetLightVisible("thunder4", false);
SetLightVisible("thunder5", false);
SetLightVisible("thunder6", false);
SetLightVisible("thunder7", false);
SetLightVisible("thunder8", false);
SetLightVisible("thunder9", false);
SetLightVisible("thunder10", false);
SetLightVisible("thunder11", false);
SetLightVisible("thunder12", false);
SetLightVisible("thunder13", false);
SetLightVisible("thunder14", false);
SetLightVisible("thunder15", false);
SetLightVisible("thunder16", false);
SetLightVisible("thunder17", false);
SetLightVisible("thunder18", false);
SetLightVisible("thunder19", false);
SetLightVisible("thunder20", false);
SetLightVisible("thunder21", false);
SetLightVisible("thunder22", false);
SetLightVisible("thunder23", false);
AddTimer("", 0.24f,"Bang2on3");
}
void Bang2on3(string &in asTimer)
{
SetLightVisible("thunder1", true);
SetLightVisible("thunder2", true);
SetLightVisible("thunder3", true);
SetLightVisible("thunder4", true);
SetLightVisible("thunder5", true);
SetLightVisible("thunder6", true);
SetLightVisible("thunder7", true);
SetLightVisible("thunder8", true);
SetLightVisible("thunder9", true);
SetLightVisible("thunder10", true);
SetLightVisible("thunder11", true);
SetLightVisible("thunder12", true);
SetLightVisible("thunder13", true);
SetLightVisible("thunder14", true);
SetLightVisible("thunder15", true);
SetLightVisible("thunder16", true);
SetLightVisible("thunder17", true);
SetLightVisible("thunder18", true);
SetLightVisible("thunder19", true);
SetLightVisible("thunder20", true);
SetLightVisible("thunder21", true);
SetLightVisible("thunder22", true);
SetLightVisible("thunder23", true);
AddTimer("", 0.17f,"Bang2off3");
}
void Bang2off3(string &in asTimer)
{
SetLightVisible("thunder1", false);
SetLightVisible("thunder2", false);
SetLightVisible("thunder3", false);
SetLightVisible("thunder4", false);
SetLightVisible("thunder5", false);
SetLightVisible("thunder6", false);
SetLightVisible("thunder7", false);
SetLightVisible("thunder8", false);
SetLightVisible("thunder9", false);
SetLightVisible("thunder10", false);
SetLightVisible("thunder11", false);
SetLightVisible("thunder12", false);
SetLightVisible("thunder13", false);
SetLightVisible("thunder14", false);
SetLightVisible("thunder15", false);
SetLightVisible("thunder16", false);
SetLightVisible("thunder17", false);
SetLightVisible("thunder18", false);
SetLightVisible("thunder19", false);
SetLightVisible("thunder20", false);
SetLightVisible("thunder21", false);
SetLightVisible("thunder22", false);
SetLightVisible("thunder23", false);
AddTimer("", 0.27f,"Bang2on4");
}
void Bang2on4(string &in asTimer)
{
SetLightVisible("thunder1", true);
SetLightVisible("thunder2", true);
SetLightVisible("thunder3", true);
SetLightVisible("thunder4", true);
SetLightVisible("thunder5", true);
SetLightVisible("thunder6", true);
SetLightVisible("thunder7", true);
SetLightVisible("thunder8", true);
SetLightVisible("thunder9", true);
SetLightVisible("thunder10", true);
SetLightVisible("thunder11", true);
SetLightVisible("thunder12", true);
SetLightVisible("thunder13", true);
SetLightVisible("thunder14", true);
SetLightVisible("thunder15", true);
SetLightVisible("thunder16", true);
SetLightVisible("thunder17", true);
SetLightVisible("thunder18", true);
SetLightVisible("thunder19", true);
SetLightVisible("thunder20", true);
SetLightVisible("thunder21", true);
SetLightVisible("thunder22", true);
SetLightVisible("thunder23", true);
AddTimer("", 0.13f,"Bang2off4");
}
void Bang2off4(string &in asTimer)
{
SetLightVisible("thunder1", false);
SetLightVisible("thunder2", false);
SetLightVisible("thunder3", false);
SetLightVisible("thunder4", false);
SetLightVisible("thunder5", false);
SetLightVisible("thunder6", false);
SetLightVisible("thunder7", false);
SetLightVisible("thunder8", false);
SetLightVisible("thunder9", false);
SetLightVisible("thunder10", false);
SetLightVisible("thunder11", false);
SetLightVisible("thunder12", false);
SetLightVisible("thunder13", false);
SetLightVisible("thunder14", false);
SetLightVisible("thunder15", false);
SetLightVisible("thunder16", false);
SetLightVisible("thunder17", false);
SetLightVisible("thunder18", false);
SetLightVisible("thunder19", false);
SetLightVisible("thunder20", false);
SetLightVisible("thunder21", false);
SetLightVisible("thunder22", false);
SetLightVisible("thunder23", false);
AddTimer("", 28.77f,"Bang3on");
}

//___________BANG 3 SERIES________________________

void Bang3on(string &in asTimer)
{
SetLightVisible("thunder1", true);
SetLightVisible("thunder2", true);
SetLightVisible("thunder3", true);
SetLightVisible("thunder4", true);
SetLightVisible("thunder5", true);
SetLightVisible("thunder6", true);
SetLightVisible("thunder7", true);
SetLightVisible("thunder8", true);
SetLightVisible("thunder9", true);
SetLightVisible("thunder10", true);
SetLightVisible("thunder11", true);
SetLightVisible("thunder12", true);
SetLightVisible("thunder13", true);
SetLightVisible("thunder14", true);
SetLightVisible("thunder15", true);
SetLightVisible("thunder16", true);
SetLightVisible("thunder17", true);
SetLightVisible("thunder18", true);
SetLightVisible("thunder19", true);
SetLightVisible("thunder20", true);
SetLightVisible("thunder21", true);
SetLightVisible("thunder22", true);
SetLightVisible("thunder23", true);
AddTimer("", 0.37f,"Bang3off");
}
void Bang3off(string &in asTimer)
{
SetLightVisible("thunder1", false);
SetLightVisible("thunder2", false);
SetLightVisible("thunder3", false);
SetLightVisible("thunder4", false);
SetLightVisible("thunder5", false);
SetLightVisible("thunder6", false);
SetLightVisible("thunder7", false);
SetLightVisible("thunder8", false);
SetLightVisible("thunder9", false);
SetLightVisible("thunder10", false);
SetLightVisible("thunder11", false);
SetLightVisible("thunder12", false);
SetLightVisible("thunder13", false);
SetLightVisible("thunder14", false);
SetLightVisible("thunder15", false);
SetLightVisible("thunder16", false);
SetLightVisible("thunder17", false);
SetLightVisible("thunder18", false);
SetLightVisible("thunder19", false);
SetLightVisible("thunder20", false);
SetLightVisible("thunder21", false);
SetLightVisible("thunder22", false);
SetLightVisible("thunder23", false);
AddTimer("", 0.17f,"Bang3on2");
}
void Bang3on2(string &in asTimer)
{
SetLightVisible("thunder1", true);
SetLightVisible("thunder2", true);
SetLightVisible("thunder3", true);
SetLightVisible("thunder4", true);
SetLightVisible("thunder5", true);
SetLightVisible("thunder6", true);
SetLightVisible("thunder7", true);
SetLightVisible("thunder8", true);
SetLightVisible("thunder9", true);
SetLightVisible("thunder10", true);
SetLightVisible("thunder11", true);
SetLightVisible("thunder12", true);
SetLightVisible("thunder13", true);
SetLightVisible("thunder14", true);
SetLightVisible("thunder15", true);
SetLightVisible("thunder16", true);
SetLightVisible("thunder17", true);
SetLightVisible("thunder18", true);
SetLightVisible("thunder19", true);
SetLightVisible("thunder20", true);
SetLightVisible("thunder21", true);
SetLightVisible("thunder22", true);
SetLightVisible("thunder23", true);
AddTimer("", 0.24f,"Bang3off2");
}
void Bang3off2(string &in asTimer)
{
SetLightVisible("thunder1", false);
SetLightVisible("thunder2", false);
SetLightVisible("thunder3", false);
SetLightVisible("thunder4", false);
SetLightVisible("thunder5", false);
SetLightVisible("thunder6", false);
SetLightVisible("thunder7", false);
SetLightVisible("thunder8", false);
SetLightVisible("thunder9", false);
SetLightVisible("thunder10", false);
SetLightVisible("thunder11", false);
SetLightVisible("thunder12", false);
SetLightVisible("thunder13", false);
SetLightVisible("thunder14", false);
SetLightVisible("thunder15", false);
SetLightVisible("thunder16", false);
SetLightVisible("thunder17", false);
SetLightVisible("thunder18", false);
SetLightVisible("thunder19", false);
SetLightVisible("thunder20", false);
SetLightVisible("thunder21", false);
SetLightVisible("thunder22", false);
SetLightVisible("thunder23", false);
AddTimer("", 0.24f,"Bang3on3");
}
void Bang3on3(string &in asTimer)
{
SetLightVisible("thunder1", true);
SetLightVisible("thunder2", true);
SetLightVisible("thunder3", true);
SetLightVisible("thunder4", true);
SetLightVisible("thunder5", true);
SetLightVisible("thunder6", true);
SetLightVisible("thunder7", true);
SetLightVisible("thunder8", true);
SetLightVisible("thunder9", true);
SetLightVisible("thunder10", true);
SetLightVisible("thunder11", true);
SetLightVisible("thunder12", true);
SetLightVisible("thunder13", true);
SetLightVisible("thunder14", true);
SetLightVisible("thunder15", true);
SetLightVisible("thunder16", true);
SetLightVisible("thunder17", true);
SetLightVisible("thunder18", true);
SetLightVisible("thunder19", true);
SetLightVisible("thunder20", true);
SetLightVisible("thunder21", true);
SetLightVisible("thunder22", true);
SetLightVisible("thunder23", true);
AddTimer("", 0.17f,"Bang3off3");
}
void Bang3off3(string &in asTimer)
{
SetLightVisible("thunder1", false);
SetLightVisible("thunder2", false);
SetLightVisible("thunder3", false);
SetLightVisible("thunder4", false);
SetLightVisible("thunder5", false);
SetLightVisible("thunder6", false);
SetLightVisible("thunder7", false);
SetLightVisible("thunder8", false);
SetLightVisible("thunder9", false);
SetLightVisible("thunder10", false);
SetLightVisible("thunder11", false);
SetLightVisible("thunder12", false);
SetLightVisible("thunder13", false);
SetLightVisible("thunder14", false);
SetLightVisible("thunder15", false);
SetLightVisible("thunder16", false);
SetLightVisible("thunder17", false);
SetLightVisible("thunder18", false);
SetLightVisible("thunder19", false);
SetLightVisible("thunder20", false);
SetLightVisible("thunder21", false);
SetLightVisible("thunder22", false);
SetLightVisible("thunder23", false);
AddTimer("", 0.27f,"Bang3on4");
}
void Bang3on4(string &in asTimer)
{
SetLightVisible("thunder1", true);
SetLightVisible("thunder2", true);
SetLightVisible("thunder3", true);
SetLightVisible("thunder4", true);
SetLightVisible("thunder5", true);
SetLightVisible("thunder6", true);
SetLightVisible("thunder7", true);
SetLightVisible("thunder8", true);
SetLightVisible("thunder9", true);
SetLightVisible("thunder10", true);
SetLightVisible("thunder11", true);
SetLightVisible("thunder12", true);
SetLightVisible("thunder13", true);
SetLightVisible("thunder14", true);
SetLightVisible("thunder15", true);
SetLightVisible("thunder16", true);
SetLightVisible("thunder17", true);
SetLightVisible("thunder18", true);
SetLightVisible("thunder19", true);
SetLightVisible("thunder20", true);
SetLightVisible("thunder21", true);
SetLightVisible("thunder22", true);
SetLightVisible("thunder23", true);
AddTimer("", 0.13f,"Bang3off4");
}
void Bang3off4(string &in asTimer)
{
SetLightVisible("thunder1", false);
SetLightVisible("thunder2", false);
SetLightVisible("thunder3", false);
SetLightVisible("thunder4", false);
SetLightVisible("thunder5", false);
SetLightVisible("thunder6", false);
SetLightVisible("thunder7", false);
SetLightVisible("thunder8", false);
SetLightVisible("thunder9", false);
SetLightVisible("thunder10", false);
SetLightVisible("thunder11", false);
SetLightVisible("thunder12", false);
SetLightVisible("thunder13", false);
SetLightVisible("thunder14", false);
SetLightVisible("thunder15", false);
SetLightVisible("thunder16", false);
SetLightVisible("thunder17", false);
SetLightVisible("thunder18", false);
SetLightVisible("thunder19", false);
SetLightVisible("thunder20", false);
SetLightVisible("thunder21", false);
SetLightVisible("thunder22", false);
SetLightVisible("thunder23", false);
AddTimer("", 18.31f,"Bang4on");
}

//______________BANG 4 SERIES______________________

void Bang4on(string &in asTimer)
{
SetLightVisible("thunder1", true);
SetLightVisible("thunder2", true);
SetLightVisible("thunder3", true);
SetLightVisible("thunder4", true);
SetLightVisible("thunder5", true);
SetLightVisible("thunder6", true);
SetLightVisible("thunder7", true);
SetLightVisible("thunder8", true);
SetLightVisible("thunder9", true);
SetLightVisible("thunder10", true);
SetLightVisible("thunder11", true);
SetLightVisible("thunder12", true);
SetLightVisible("thunder13", true);
SetLightVisible("thunder14", true);
SetLightVisible("thunder15", true);
SetLightVisible("thunder16", true);
SetLightVisible("thunder17", true);
SetLightVisible("thunder18", true);
SetLightVisible("thunder19", true);
SetLightVisible("thunder20", true);
SetLightVisible("thunder21", true);
SetLightVisible("thunder22", true);
SetLightVisible("thunder23", true);
AddTimer("", 0.37f,"Bang4off");
}
void Bang4off(string &in asTimer)
{
SetLightVisible("thunder1", false);
SetLightVisible("thunder2", false);
SetLightVisible("thunder3", false);
SetLightVisible("thunder4", false);
SetLightVisible("thunder5", false);
SetLightVisible("thunder6", false);
SetLightVisible("thunder7", false);
SetLightVisible("thunder8", false);
SetLightVisible("thunder9", false);
SetLightVisible("thunder10", false);
SetLightVisible("thunder11", false);
SetLightVisible("thunder12", false);
SetLightVisible("thunder13", false);
SetLightVisible("thunder14", false);
SetLightVisible("thunder15", false);
SetLightVisible("thunder16", false);
SetLightVisible("thunder17", false);
SetLightVisible("thunder18", false);
SetLightVisible("thunder19", false);
SetLightVisible("thunder20", false);
SetLightVisible("thunder21", false);
SetLightVisible("thunder22", false);
SetLightVisible("thunder23", false);
AddTimer("", 0.17f,"Bang4on2");
}
void Bang4on2(string &in asTimer)
{
SetLightVisible("thunder1", true);
SetLightVisible("thunder2", true);
SetLightVisible("thunder3", true);
SetLightVisible("thunder4", true);
SetLightVisible("thunder5", true);
SetLightVisible("thunder6", true);
SetLightVisible("thunder7", true);
SetLightVisible("thunder8", true);
SetLightVisible("thunder9", true);
SetLightVisible("thunder10", true);
SetLightVisible("thunder11", true);
SetLightVisible("thunder12", true);
SetLightVisible("thunder13", true);
SetLightVisible("thunder14", true);
SetLightVisible("thunder15", true);
SetLightVisible("thunder16", true);
SetLightVisible("thunder17", true);
SetLightVisible("thunder18", true);
SetLightVisible("thunder19", true);
SetLightVisible("thunder20", true);
SetLightVisible("thunder21", true);
SetLightVisible("thunder22", true);
SetLightVisible("thunder23", true);
AddTimer("", 0.24f,"Bang4off2");
}
void Bang4off2(string &in asTimer)
{
SetLightVisible("thunder1", false);
SetLightVisible("thunder2", false);
SetLightVisible("thunder3", false);
SetLightVisible("thunder4", false);
SetLightVisible("thunder5", false);
SetLightVisible("thunder6", false);
SetLightVisible("thunder7", false);
SetLightVisible("thunder8", false);
SetLightVisible("thunder9", false);
SetLightVisible("thunder10", false);
SetLightVisible("thunder11", false);
SetLightVisible("thunder12", false);
SetLightVisible("thunder13", false);
SetLightVisible("thunder14", false);
SetLightVisible("thunder15", false);
SetLightVisible("thunder16", false);
SetLightVisible("thunder17", false);
SetLightVisible("thunder18", false);
SetLightVisible("thunder19", false);
SetLightVisible("thunder20", false);
SetLightVisible("thunder21", false);
SetLightVisible("thunder22", false);
SetLightVisible("thunder23", false);
AddTimer("", 0.24f,"Bang4on3");
}
void Bang4on3(string &in asTimer)
{
SetLightVisible("thunder1", true);
SetLightVisible("thunder2", true);
SetLightVisible("thunder3", true);
SetLightVisible("thunder4", true);
SetLightVisible("thunder5", true);
SetLightVisible("thunder6", true);
SetLightVisible("thunder7", true);
SetLightVisible("thunder8", true);
SetLightVisible("thunder9", true);
SetLightVisible("thunder10", true);
SetLightVisible("thunder11", true);
SetLightVisible("thunder12", true);
SetLightVisible("thunder13", true);
SetLightVisible("thunder14", true);
SetLightVisible("thunder15", true);
SetLightVisible("thunder16", true);
SetLightVisible("thunder17", true);
SetLightVisible("thunder18", true);
SetLightVisible("thunder19", true);
SetLightVisible("thunder20", true);
SetLightVisible("thunder21", true);
SetLightVisible("thunder22", true);
SetLightVisible("thunder23", true);
AddTimer("", 0.17f,"Bang4off3");
}
void Bang4off3(string &in asTimer)
{
SetLightVisible("thunder1", false);
SetLightVisible("thunder2", false);
SetLightVisible("thunder3", false);
SetLightVisible("thunder4", false);
SetLightVisible("thunder5", false);
SetLightVisible("thunder6", false);
SetLightVisible("thunder7", false);
SetLightVisible("thunder8", false);
SetLightVisible("thunder9", false);
SetLightVisible("thunder10", false);
SetLightVisible("thunder11", false);
SetLightVisible("thunder12", false);
SetLightVisible("thunder13", false);
SetLightVisible("thunder14", false);
SetLightVisible("thunder15", false);
SetLightVisible("thunder16", false);
SetLightVisible("thunder17", false);
SetLightVisible("thunder18", false);
SetLightVisible("thunder19", false);
SetLightVisible("thunder20", false);
SetLightVisible("thunder21", false);
SetLightVisible("thunder22", false);
SetLightVisible("thunder23", false);
AddTimer("", 0.27f,"Bang4on4");
}
void Bang4on4(string &in asTimer)
{
SetLightVisible("thunder1", true);
SetLightVisible("thunder2", true);
SetLightVisible("thunder3", true);
SetLightVisible("thunder4", true);
SetLightVisible("thunder5", true);
SetLightVisible("thunder6", true);
SetLightVisible("thunder7", true);
SetLightVisible("thunder8", true);
SetLightVisible("thunder9", true);
SetLightVisible("thunder10", true);
SetLightVisible("thunder11", true);
SetLightVisible("thunder12", true);
SetLightVisible("thunder13", true);
SetLightVisible("thunder14", true);
SetLightVisible("thunder15", true);
SetLightVisible("thunder16", true);
SetLightVisible("thunder17", true);
SetLightVisible("thunder18", true);
SetLightVisible("thunder19", true);
SetLightVisible("thunder20", true);
SetLightVisible("thunder21", true);
SetLightVisible("thunder22", true);
SetLightVisible("thunder23", true);
AddTimer("", 0.13f,"Bang4off4");
}
void Bang4off4(string &in asTimer)
{
SetLightVisible("thunder1", false);
SetLightVisible("thunder2", false);
SetLightVisible("thunder3", false);
SetLightVisible("thunder4", false);
SetLightVisible("thunder5", false);
SetLightVisible("thunder6", false);
SetLightVisible("thunder7", false);
SetLightVisible("thunder8", false);
SetLightVisible("thunder9", false);
SetLightVisible("thunder10", false);
SetLightVisible("thunder11", false);
SetLightVisible("thunder12", false);
SetLightVisible("thunder13", false);
SetLightVisible("thunder14", false);
SetLightVisible("thunder15", false);
SetLightVisible("thunder16", false);
SetLightVisible("thunder17", false);
SetLightVisible("thunder18", false);
SetLightVisible("thunder19", false);
SetLightVisible("thunder20", false);
SetLightVisible("thunder21", false);
SetLightVisible("thunder22", false);
SetLightVisible("thunder23", false);
AddTimer("", 51.88f,"Bang5on");
}

//_________BANG 5 SERIES__________________

void Bang5on(string &in asTimer)
{
SetLightVisible("thunder1", true);
SetLightVisible("thunder2", true);
SetLightVisible("thunder3", true);
SetLightVisible("thunder4", true);
SetLightVisible("thunder5", true);
SetLightVisible("thunder6", true);
SetLightVisible("thunder7", true);
SetLightVisible("thunder8", true);
SetLightVisible("thunder9", true);
SetLightVisible("thunder10", true);
SetLightVisible("thunder11", true);
SetLightVisible("thunder12", true);
SetLightVisible("thunder13", true);
SetLightVisible("thunder14", true);
SetLightVisible("thunder15", true);
SetLightVisible("thunder16", true);
SetLightVisible("thunder17", true);
SetLightVisible("thunder18", true);
SetLightVisible("thunder19", true);
SetLightVisible("thunder20", true);
SetLightVisible("thunder21", true);
SetLightVisible("thunder22", true);
SetLightVisible("thunder23", true);
AddTimer("", 0.37f,"Bang5off");
}
void Bang5off(string &in asTimer)
{
SetLightVisible("thunder1", false);
SetLightVisible("thunder2", false);
SetLightVisible("thunder3", false);
SetLightVisible("thunder4", false);
SetLightVisible("thunder5", false);
SetLightVisible("thunder6", false);
SetLightVisible("thunder7", false);
SetLightVisible("thunder8", false);
SetLightVisible("thunder9", false);
SetLightVisible("thunder10", false);
SetLightVisible("thunder11", false);
SetLightVisible("thunder12", false);
SetLightVisible("thunder13", false);
SetLightVisible("thunder14", false);
SetLightVisible("thunder15", false);
SetLightVisible("thunder16", false);
SetLightVisible("thunder17", false);
SetLightVisible("thunder18", false);
SetLightVisible("thunder19", false);
SetLightVisible("thunder20", false);
SetLightVisible("thunder21", false);
SetLightVisible("thunder22", false);
SetLightVisible("thunder23", false);
AddTimer("", 0.17f,"Bang5on2");
}
void Bang5on2(string &in asTimer)
{
SetLightVisible("thunder1", true);
SetLightVisible("thunder2", true);
SetLightVisible("thunder3", true);
SetLightVisible("thunder4", true);
SetLightVisible("thunder5", true);
SetLightVisible("thunder6", true);
SetLightVisible("thunder7", true);
SetLightVisible("thunder8", true);
SetLightVisible("thunder9", true);
SetLightVisible("thunder10", true);
SetLightVisible("thunder11", true);
SetLightVisible("thunder12", true);
SetLightVisible("thunder13", true);
SetLightVisible("thunder14", true);
SetLightVisible("thunder15", true);
SetLightVisible("thunder16", true);
SetLightVisible("thunder17", true);
SetLightVisible("thunder18", true);
SetLightVisible("thunder19", true);
SetLightVisible("thunder20", true);
SetLightVisible("thunder21", true);
SetLightVisible("thunder22", true);
SetLightVisible("thunder23", true);
AddTimer("", 0.24f,"Bang5off2");
}
void Bang5off2(string &in asTimer)
{
SetLightVisible("thunder1", false);
SetLightVisible("thunder2", false);
SetLightVisible("thunder3", false);
SetLightVisible("thunder4", false);
SetLightVisible("thunder5", false);
SetLightVisible("thunder6", false);
SetLightVisible("thunder7", false);
SetLightVisible("thunder8", false);
SetLightVisible("thunder9", false);
SetLightVisible("thunder10", false);
SetLightVisible("thunder11", false);
SetLightVisible("thunder12", false);
SetLightVisible("thunder13", false);
SetLightVisible("thunder14", false);
SetLightVisible("thunder15", false);
SetLightVisible("thunder16", false);
SetLightVisible("thunder17", false);
SetLightVisible("thunder18", false);
SetLightVisible("thunder19", false);
SetLightVisible("thunder20", false);
SetLightVisible("thunder21", false);
SetLightVisible("thunder22", false);
SetLightVisible("thunder23", false);
AddTimer("", 0.24f,"Bang5on3");
}
void Bang5on3(string &in asTimer)
{
SetLightVisible("thunder1", true);
SetLightVisible("thunder2", true);
SetLightVisible("thunder3", true);
SetLightVisible("thunder4", true);
SetLightVisible("thunder5", true);
SetLightVisible("thunder6", true);
SetLightVisible("thunder7", true);
SetLightVisible("thunder8", true);
SetLightVisible("thunder9", true);
SetLightVisible("thunder10", true);
SetLightVisible("thunder11", true);
SetLightVisible("thunder12", true);
SetLightVisible("thunder13", true);
SetLightVisible("thunder14", true);
SetLightVisible("thunder15", true);
SetLightVisible("thunder16", true);
SetLightVisible("thunder17", true);
SetLightVisible("thunder18", true);
SetLightVisible("thunder19", true);
SetLightVisible("thunder20", true);
SetLightVisible("thunder21", true);
SetLightVisible("thunder22", true);
SetLightVisible("thunder23", true);
AddTimer("", 0.17f,"Bang5off3");
}
void Bang5off3(string &in asTimer)
{
SetLightVisible("thunder1", false);
SetLightVisible("thunder2", false);
SetLightVisible("thunder3", false);
SetLightVisible("thunder4", false);
SetLightVisible("thunder5", false);
SetLightVisible("thunder6", false);
SetLightVisible("thunder7", false);
SetLightVisible("thunder8", false);
SetLightVisible("thunder9", false);
SetLightVisible("thunder10", false);
SetLightVisible("thunder11", false);
SetLightVisible("thunder12", false);
SetLightVisible("thunder13", false);
SetLightVisible("thunder14", false);
SetLightVisible("thunder15", false);
SetLightVisible("thunder16", false);
SetLightVisible("thunder17", false);
SetLightVisible("thunder18", false);
SetLightVisible("thunder19", false);
SetLightVisible("thunder20", false);
SetLightVisible("thunder21", false);
SetLightVisible("thunder22", false);
SetLightVisible("thunder23", false);
AddTimer("", 0.27f,"Bang5on4");
}
void Bang5on4(string &in asTimer)
{
SetLightVisible("thunder1", true);
SetLightVisible("thunder2", true);
SetLightVisible("thunder3", true);
SetLightVisible("thunder4", true);
SetLightVisible("thunder5", true);
SetLightVisible("thunder6", true);
SetLightVisible("thunder7", true);
SetLightVisible("thunder8", true);
SetLightVisible("thunder9", true);
SetLightVisible("thunder10", true);
SetLightVisible("thunder11", true);
SetLightVisible("thunder12", true);
SetLightVisible("thunder13", true);
SetLightVisible("thunder14", true);
SetLightVisible("thunder15", true);
SetLightVisible("thunder16", true);
SetLightVisible("thunder17", true);
SetLightVisible("thunder18", true);
SetLightVisible("thunder19", true);
SetLightVisible("thunder20", true);
SetLightVisible("thunder21", true);
SetLightVisible("thunder22", true);
SetLightVisible("thunder23", true);
AddTimer("", 0.13f,"Bang5off4");
}
void Bang5off4(string &in asTimer)
{
SetLightVisible("thunder1", false);
SetLightVisible("thunder2", false);
SetLightVisible("thunder3", false);
SetLightVisible("thunder4", false);
SetLightVisible("thunder5", false);
SetLightVisible("thunder6", false);
SetLightVisible("thunder7", false);
SetLightVisible("thunder8", false);
SetLightVisible("thunder9", false);
SetLightVisible("thunder10", false);
SetLightVisible("thunder11", false);
SetLightVisible("thunder12", false);
SetLightVisible("thunder13", false);
SetLightVisible("thunder14", false);
SetLightVisible("thunder15", false);
SetLightVisible("thunder16", false);
SetLightVisible("thunder17", false);
SetLightVisible("thunder18", false);
SetLightVisible("thunder19", false);
SetLightVisible("thunder20", false);
SetLightVisible("thunder21", false);
SetLightVisible("thunder22", false);
SetLightVisible("thunder23", false);
AddTimer("", 62.24f,"Bang6on");
}

//________BANG 6 SERIES________________

void Bang6on(string &in asTimer)
{
SetLightVisible("thunder1", true);
SetLightVisible("thunder2", true);
SetLightVisible("thunder3", true);
SetLightVisible("thunder4", true);
SetLightVisible("thunder5", true);
SetLightVisible("thunder6", true);
SetLightVisible("thunder7", true);
SetLightVisible("thunder8", true);
SetLightVisible("thunder9", true);
SetLightVisible("thunder10", true);
SetLightVisible("thunder11", true);
SetLightVisible("thunder12", true);
SetLightVisible("thunder13", true);
SetLightVisible("thunder14", true);
SetLightVisible("thunder15", true);
SetLightVisible("thunder16", true);
SetLightVisible("thunder17", true);
SetLightVisible("thunder18", true);
SetLightVisible("thunder19", true);
SetLightVisible("thunder20", true);
SetLightVisible("thunder21", true);
SetLightVisible("thunder22", true);
SetLightVisible("thunder23", true);
AddTimer("", 0.37f,"Bang6off");
}
void Bang6off(string &in asTimer)
{
SetLightVisible("thunder1", false);
SetLightVisible("thunder2", false);
SetLightVisible("thunder3", false);
SetLightVisible("thunder4", false);
SetLightVisible("thunder5", false);
SetLightVisible("thunder6", false);
SetLightVisible("thunder7", false);
SetLightVisible("thunder8", false);
SetLightVisible("thunder9", false);
SetLightVisible("thunder10", false);
SetLightVisible("thunder11", false);
SetLightVisible("thunder12", false);
SetLightVisible("thunder13", false);
SetLightVisible("thunder14", false);
SetLightVisible("thunder15", false);
SetLightVisible("thunder16", false);
SetLightVisible("thunder17", false);
SetLightVisible("thunder18", false);
SetLightVisible("thunder19", false);
SetLightVisible("thunder20", false);
SetLightVisible("thunder21", false);
SetLightVisible("thunder22", false);
SetLightVisible("thunder23", false);
AddTimer("", 0.17f,"Bang6on2");
}
void Bang6on2(string &in asTimer)
{
SetLightVisible("thunder1", true);
SetLightVisible("thunder2", true);
SetLightVisible("thunder3", true);
SetLightVisible("thunder4", true);
SetLightVisible("thunder5", true);
SetLightVisible("thunder6", true);
SetLightVisible("thunder7", true);
SetLightVisible("thunder8", true);
SetLightVisible("thunder9", true);
SetLightVisible("thunder10", true);
SetLightVisible("thunder11", true);
SetLightVisible("thunder12", true);
SetLightVisible("thunder13", true);
SetLightVisible("thunder14", true);
SetLightVisible("thunder15", true);
SetLightVisible("thunder16", true);
SetLightVisible("thunder17", true);
SetLightVisible("thunder18", true);
SetLightVisible("thunder19", true);
SetLightVisible("thunder20", true);
SetLightVisible("thunder21", true);
SetLightVisible("thunder22", true);
SetLightVisible("thunder23", true);
AddTimer("", 0.24f,"Bang6off2");
}
void Bang6off2(string &in asTimer)
{
SetLightVisible("thunder1", false);
SetLightVisible("thunder2", false);
SetLightVisible("thunder3", false);
SetLightVisible("thunder4", false);
SetLightVisible("thunder5", false);
SetLightVisible("thunder6", false);
SetLightVisible("thunder7", false);
SetLightVisible("thunder8", false);
SetLightVisible("thunder9", false);
SetLightVisible("thunder10", false);
SetLightVisible("thunder11", false);
SetLightVisible("thunder12", false);
SetLightVisible("thunder13", false);
SetLightVisible("thunder14", false);
SetLightVisible("thunder15", false);
SetLightVisible("thunder16", false);
SetLightVisible("thunder17", false);
SetLightVisible("thunder18", false);
SetLightVisible("thunder19", false);
SetLightVisible("thunder20", false);
SetLightVisible("thunder21", false);
SetLightVisible("thunder22", false);
SetLightVisible("thunder23", false);
AddTimer("", 0.24f,"Bang6on3");
}
void Bang6on3(string &in asTimer)
{
SetLightVisible("thunder1", true);
SetLightVisible("thunder2", true);
SetLightVisible("thunder3", true);
SetLightVisible("thunder4", true);
SetLightVisible("thunder5", true);
SetLightVisible("thunder6", true);
SetLightVisible("thunder7", true);
SetLightVisible("thunder8", true);
SetLightVisible("thunder9", true);
SetLightVisible("thunder10", true);
SetLightVisible("thunder11", true);
SetLightVisible("thunder12", true);
SetLightVisible("thunder13", true);
SetLightVisible("thunder14", true);
SetLightVisible("thunder15", true);
SetLightVisible("thunder16", true);
SetLightVisible("thunder17", true);
SetLightVisible("thunder18", true);
SetLightVisible("thunder19", true);
SetLightVisible("thunder20", true);
SetLightVisible("thunder21", true);
SetLightVisible("thunder22", true);
SetLightVisible("thunder23", true);
AddTimer("", 0.17f,"Bang6off3");
}
void Bang6off3(string &in asTimer)
{
SetLightVisible("thunder1", false);
SetLightVisible("thunder2", false);
SetLightVisible("thunder3", false);
SetLightVisible("thunder4", false);
SetLightVisible("thunder5", false);
SetLightVisible("thunder6", false);
SetLightVisible("thunder7", false);
SetLightVisible("thunder8", false);
SetLightVisible("thunder9", false);
SetLightVisible("thunder10", false);
SetLightVisible("thunder11", false);
SetLightVisible("thunder12", false);
SetLightVisible("thunder13", false);
SetLightVisible("thunder14", false);
SetLightVisible("thunder15", false);
SetLightVisible("thunder16", false);
SetLightVisible("thunder17", false);
SetLightVisible("thunder18", false);
SetLightVisible("thunder19", false);
SetLightVisible("thunder20", false);
SetLightVisible("thunder21", false);
SetLightVisible("thunder22", false);
SetLightVisible("thunder23", false);
AddTimer("", 0.27f,"Bang6on4");
}
void Bang6on4(string &in asTimer)
{
SetLightVisible("thunder1", true);
SetLightVisible("thunder2", true);
SetLightVisible("thunder3", true);
SetLightVisible("thunder4", true);
SetLightVisible("thunder5", true);
SetLightVisible("thunder6", true);
SetLightVisible("thunder7", true);
SetLightVisible("thunder8", true);
SetLightVisible("thunder9", true);
SetLightVisible("thunder10", true);
SetLightVisible("thunder11", true);
SetLightVisible("thunder12", true);
SetLightVisible("thunder13", true);
SetLightVisible("thunder14", true);
SetLightVisible("thunder15", true);
SetLightVisible("thunder16", true);
SetLightVisible("thunder17", true);
SetLightVisible("thunder18", true);
SetLightVisible("thunder19", true);
SetLightVisible("thunder20", true);
SetLightVisible("thunder21", true);
SetLightVisible("thunder22", true);
SetLightVisible("thunder23", true);
AddTimer("", 0.13f,"Bang6off4");
}
void Bang6off4(string &in asTimer)
{
SetLightVisible("thunder1", false);
SetLightVisible("thunder2", false);
SetLightVisible("thunder3", false);
SetLightVisible("thunder4", false);
SetLightVisible("thunder5", false);
SetLightVisible("thunder6", false);
SetLightVisible("thunder7", false);
SetLightVisible("thunder8", false);
SetLightVisible("thunder9", false);
SetLightVisible("thunder10", false);
SetLightVisible("thunder11", false);
SetLightVisible("thunder12", false);
SetLightVisible("thunder13", false);
SetLightVisible("thunder14", false);
SetLightVisible("thunder15", false);
SetLightVisible("thunder16", false);
SetLightVisible("thunder17", false);
SetLightVisible("thunder18", false);
SetLightVisible("thunder19", false);
SetLightVisible("thunder20", false);
SetLightVisible("thunder21", false);
SetLightVisible("thunder22", false);
SetLightVisible("thunder23", false);
AddTimer("", 68.26f,"Bang7on");
}

//_________BANG 7 SERIES_____________________

void Bang7on(string &in asTimer)
{
SetLightVisible("thunder1", true);
SetLightVisible("thunder2", true);
SetLightVisible("thunder3", true);
SetLightVisible("thunder4", true);
SetLightVisible("thunder5", true);
SetLightVisible("thunder6", true);
SetLightVisible("thunder7", true);
SetLightVisible("thunder8", true);
SetLightVisible("thunder9", true);
SetLightVisible("thunder10", true);
SetLightVisible("thunder11", true);
SetLightVisible("thunder12", true);
SetLightVisible("thunder13", true);
SetLightVisible("thunder14", true);
SetLightVisible("thunder15", true);
SetLightVisible("thunder16", true);
SetLightVisible("thunder17", true);
SetLightVisible("thunder18", true);
SetLightVisible("thunder19", true);
SetLightVisible("thunder20", true);
SetLightVisible("thunder21", true);
SetLightVisible("thunder22", true);
SetLightVisible("thunder23", true);
AddTimer("", 0.37f,"Bang7off");
}
void Bang7off(string &in asTimer)
{
SetLightVisible("thunder1", false);
SetLightVisible("thunder2", false);
SetLightVisible("thunder3", false);
SetLightVisible("thunder4", false);
SetLightVisible("thunder5", false);
SetLightVisible("thunder6", false);
SetLightVisible("thunder7", false);
SetLightVisible("thunder8", false);
SetLightVisible("thunder9", false);
SetLightVisible("thunder10", false);
SetLightVisible("thunder11", false);
SetLightVisible("thunder12", false);
SetLightVisible("thunder13", false);
SetLightVisible("thunder14", false);
SetLightVisible("thunder15", false);
SetLightVisible("thunder16", false);
SetLightVisible("thunder17", false);
SetLightVisible("thunder18", false);
SetLightVisible("thunder19", false);
SetLightVisible("thunder20", false);
SetLightVisible("thunder21", false);
SetLightVisible("thunder22", false);
SetLightVisible("thunder23", false);
AddTimer("", 0.17f,"Bang7on2");
}
void Bang7on2(string &in asTimer)
{
SetLightVisible("thunder1", true);
SetLightVisible("thunder2", true);
SetLightVisible("thunder3", true);
SetLightVisible("thunder4", true);
SetLightVisible("thunder5", true);
SetLightVisible("thunder6", true);
SetLightVisible("thunder7", true);
SetLightVisible("thunder8", true);
SetLightVisible("thunder9", true);
SetLightVisible("thunder10", true);
SetLightVisible("thunder11", true);
SetLightVisible("thunder12", true);
SetLightVisible("thunder13", true);
SetLightVisible("thunder14", true);
SetLightVisible("thunder15", true);
SetLightVisible("thunder16", true);
SetLightVisible("thunder17", true);
SetLightVisible("thunder18", true);
SetLightVisible("thunder19", true);
SetLightVisible("thunder20", true);
SetLightVisible("thunder21", true);
SetLightVisible("thunder22", true);
SetLightVisible("thunder23", true);
AddTimer("", 0.24f,"Bang7off2");
}
void Bang7off2(string &in asTimer)
{
SetLightVisible("thunder1", false);
SetLightVisible("thunder2", false);
SetLightVisible("thunder3", false);
SetLightVisible("thunder4", false);
SetLightVisible("thunder5", false);
SetLightVisible("thunder6", false);
SetLightVisible("thunder7", false);
SetLightVisible("thunder8", false);
SetLightVisible("thunder9", false);
SetLightVisible("thunder10", false);
SetLightVisible("thunder11", false);
SetLightVisible("thunder12", false);
SetLightVisible("thunder13", false);
SetLightVisible("thunder14", false);
SetLightVisible("thunder15", false);
SetLightVisible("thunder16", false);
SetLightVisible("thunder17", false);
SetLightVisible("thunder18", false);
SetLightVisible("thunder19", false);
SetLightVisible("thunder20", false);
SetLightVisible("thunder21", false);
SetLightVisible("thunder22", false);
SetLightVisible("thunder23", false);
AddTimer("", 0.24f,"Bang7on3");
}
void Bang7on3(string &in asTimer)
{
SetLightVisible("thunder1", true);
SetLightVisible("thunder2", true);
SetLightVisible("thunder3", true);
SetLightVisible("thunder4", true);
SetLightVisible("thunder5", true);
SetLightVisible("thunder6", true);
SetLightVisible("thunder7", true);
SetLightVisible("thunder8", true);
SetLightVisible("thunder9", true);
SetLightVisible("thunder10", true);
SetLightVisible("thunder11", true);
SetLightVisible("thunder12", true);
SetLightVisible("thunder13", true);
SetLightVisible("thunder14", true);
SetLightVisible("thunder15", true);
SetLightVisible("thunder16", true);
SetLightVisible("thunder17", true);
SetLightVisible("thunder18", true);
SetLightVisible("thunder19", true);
SetLightVisible("thunder20", true);
SetLightVisible("thunder21", true);
SetLightVisible("thunder22", true);
SetLightVisible("thunder23", true);
AddTimer("", 0.17f,"Bang7off3");
}
void Bang7off3(string &in asTimer)
{
SetLightVisible("thunder1", false);
SetLightVisible("thunder2", false);
SetLightVisible("thunder3", false);
SetLightVisible("thunder4", false);
SetLightVisible("thunder5", false);
SetLightVisible("thunder6", false);
SetLightVisible("thunder7", false);
SetLightVisible("thunder8", false);
SetLightVisible("thunder9", false);
SetLightVisible("thunder10", false);
SetLightVisible("thunder11", false);
SetLightVisible("thunder12", false);
SetLightVisible("thunder13", false);
SetLightVisible("thunder14", false);
SetLightVisible("thunder15", false);
SetLightVisible("thunder16", false);
SetLightVisible("thunder17", false);
SetLightVisible("thunder18", false);
SetLightVisible("thunder19", false);
SetLightVisible("thunder20", false);
SetLightVisible("thunder21", false);
SetLightVisible("thunder22", false);
SetLightVisible("thunder23", false);
AddTimer("", 0.27f,"Bang7on4");
}
void Bang7on4(string &in asTimer)
{
SetLightVisible("thunder1", true);
SetLightVisible("thunder2", true);
SetLightVisible("thunder3", true);
SetLightVisible("thunder4", true);
SetLightVisible("thunder5", true);
SetLightVisible("thunder6", true);
SetLightVisible("thunder7", true);
SetLightVisible("thunder8", true);
SetLightVisible("thunder9", true);
SetLightVisible("thunder10", true);
SetLightVisible("thunder11", true);
SetLightVisible("thunder12", true);
SetLightVisible("thunder13", true);
SetLightVisible("thunder14", true);
SetLightVisible("thunder15", true);
SetLightVisible("thunder16", true);
SetLightVisible("thunder17", true);
SetLightVisible("thunder18", true);
SetLightVisible("thunder19", true);
SetLightVisible("thunder20", true);
SetLightVisible("thunder21", true);
SetLightVisible("thunder22", true);
SetLightVisible("thunder23", true);
AddTimer("", 0.13f,"Bang7off4");
}
void Bang7off4(string &in asTimer)
{
SetLightVisible("thunder1", false);
SetLightVisible("thunder2", false);
SetLightVisible("thunder3", false);
SetLightVisible("thunder4", false);
SetLightVisible("thunder5", false);
SetLightVisible("thunder6", false);
SetLightVisible("thunder7", false);
SetLightVisible("thunder8", false);
SetLightVisible("thunder9", false);
SetLightVisible("thunder10", false);
SetLightVisible("thunder11", false);
SetLightVisible("thunder12", false);
SetLightVisible("thunder13", false);
SetLightVisible("thunder14", false);
SetLightVisible("thunder15", false);
SetLightVisible("thunder16", false);
SetLightVisible("thunder17", false);
SetLightVisible("thunder18", false);
SetLightVisible("thunder19", false);
SetLightVisible("thunder20", false);
SetLightVisible("thunder21", false);
SetLightVisible("thunder22", false);
SetLightVisible("thunder23", false);
AddTimer("", 50.70f,"Bang8on");
}

//___________BANG 8 SERIES____________________

void Bang8on(string &in asTimer)
{
SetLightVisible("thunder1", true);
SetLightVisible("thunder2", true);
SetLightVisible("thunder3", true);
SetLightVisible("thunder4", true);
SetLightVisible("thunder5", true);
SetLightVisible("thunder6", true);
SetLightVisible("thunder7", true);
SetLightVisible("thunder8", true);
SetLightVisible("thunder9", true);
SetLightVisible("thunder10", true);
SetLightVisible("thunder11", true);
SetLightVisible("thunder12", true);
SetLightVisible("thunder13", true);
SetLightVisible("thunder14", true);
SetLightVisible("thunder15", true);
SetLightVisible("thunder16", true);
SetLightVisible("thunder17", true);
SetLightVisible("thunder18", true);
SetLightVisible("thunder19", true);
SetLightVisible("thunder20", true);
SetLightVisible("thunder21", true);
SetLightVisible("thunder22", true);
SetLightVisible("thunder23", true);
AddTimer("", 0.37f,"Bang8off");
}
void Bang8off(string &in asTimer)
{
SetLightVisible("thunder1", false);
SetLightVisible("thunder2", false);
SetLightVisible("thunder3", false);
SetLightVisible("thunder4", false);
SetLightVisible("thunder5", false);
SetLightVisible("thunder6", false);
SetLightVisible("thunder7", false);
SetLightVisible("thunder8", false);
SetLightVisible("thunder9", false);
SetLightVisible("thunder10", false);
SetLightVisible("thunder11", false);
SetLightVisible("thunder12", false);
SetLightVisible("thunder13", false);
SetLightVisible("thunder14", false);
SetLightVisible("thunder15", false);
SetLightVisible("thunder16", false);
SetLightVisible("thunder17", false);
SetLightVisible("thunder18", false);
SetLightVisible("thunder19", false);
SetLightVisible("thunder20", false);
SetLightVisible("thunder21", false);
SetLightVisible("thunder22", false);
SetLightVisible("thunder23", false);
AddTimer("", 0.17f,"Bang8on2");
}
void Bang8on2(string &in asTimer)
{
SetLightVisible("thunder1", true);
SetLightVisible("thunder2", true);
SetLightVisible("thunder3", true);
SetLightVisible("thunder4", true);
SetLightVisible("thunder5", true);
SetLightVisible("thunder6", true);
SetLightVisible("thunder7", true);
SetLightVisible("thunder8", true);
SetLightVisible("thunder9", true);
SetLightVisible("thunder10", true);
SetLightVisible("thunder11", true);
SetLightVisible("thunder12", true);
SetLightVisible("thunder13", true);
SetLightVisible("thunder14", true);
SetLightVisible("thunder15", true);
SetLightVisible("thunder16", true);
SetLightVisible("thunder17", true);
SetLightVisible("thunder18", true);
SetLightVisible("thunder19", true);
SetLightVisible("thunder20", true);
SetLightVisible("thunder21", true);
SetLightVisible("thunder22", true);
SetLightVisible("thunder23", true);
AddTimer("", 0.24f,"Bang8off2");
}
void Bang8off2(string &in asTimer)
{
SetLightVisible("thunder1", false);
SetLightVisible("thunder2", false);
SetLightVisible("thunder3", false);
SetLightVisible("thunder4", false);
SetLightVisible("thunder5", false);
SetLightVisible("thunder6", false);
SetLightVisible("thunder7", false);
SetLightVisible("thunder8", false);
SetLightVisible("thunder9", false);
SetLightVisible("thunder10", false);
SetLightVisible("thunder11", false);
SetLightVisible("thunder12", false);
SetLightVisible("thunder13", false);
SetLightVisible("thunder14", false);
SetLightVisible("thunder15", false);
SetLightVisible("thunder16", false);
SetLightVisible("thunder17", false);
SetLightVisible("thunder18", false);
SetLightVisible("thunder19", false);
SetLightVisible("thunder20", false);
SetLightVisible("thunder21", false);
SetLightVisible("thunder22", false);
SetLightVisible("thunder23", false);
AddTimer("", 0.24f,"Bang8on3");
}
void Bang8on3(string &in asTimer)
{
SetLightVisible("thunder1", true);
SetLightVisible("thunder2", true);
SetLightVisible("thunder3", true);
SetLightVisible("thunder4", true);
SetLightVisible("thunder5", true);
SetLightVisible("thunder6", true);
SetLightVisible("thunder7", true);
SetLightVisible("thunder8", true);
SetLightVisible("thunder9", true);
SetLightVisible("thunder10", true);
SetLightVisible("thunder11", true);
SetLightVisible("thunder12", true);
SetLightVisible("thunder13", true);
SetLightVisible("thunder14", true);
SetLightVisible("thunder15", true);
SetLightVisible("thunder16", true);
SetLightVisible("thunder17", true);
SetLightVisible("thunder18", true);
SetLightVisible("thunder19", true);
SetLightVisible("thunder20", true);
SetLightVisible("thunder21", true);
SetLightVisible("thunder22", true);
SetLightVisible("thunder23", true);
AddTimer("", 0.17f,"Bang8off3");
}
void Bang8off3(string &in asTimer)
{
SetLightVisible("thunder1", false);
SetLightVisible("thunder2", false);
SetLightVisible("thunder3", false);
SetLightVisible("thunder4", false);
SetLightVisible("thunder5", false);
SetLightVisible("thunder6", false);
SetLightVisible("thunder7", false);
SetLightVisible("thunder8", false);
SetLightVisible("thunder9", false);
SetLightVisible("thunder10", false);
SetLightVisible("thunder11", false);
SetLightVisible("thunder12", false);
SetLightVisible("thunder13", false);
SetLightVisible("thunder14", false);
SetLightVisible("thunder15", false);
SetLightVisible("thunder16", false);
SetLightVisible("thunder17", false);
SetLightVisible("thunder18", false);
SetLightVisible("thunder19", false);
SetLightVisible("thunder20", false);
SetLightVisible("thunder21", false);
SetLightVisible("thunder22", false);
SetLightVisible("thunder23", false);
AddTimer("", 0.27f,"Bang8on4");
}
void Bang8on4(string &in asTimer)
{
SetLightVisible("thunder1", true);
SetLightVisible("thunder2", true);
SetLightVisible("thunder3", true);
SetLightVisible("thunder4", true);
SetLightVisible("thunder5", true);
SetLightVisible("thunder6", true);
SetLightVisible("thunder7", true);
SetLightVisible("thunder8", true);
SetLightVisible("thunder9", true);
SetLightVisible("thunder10", true);
SetLightVisible("thunder11", true);
SetLightVisible("thunder12", true);
SetLightVisible("thunder13", true);
SetLightVisible("thunder14", true);
SetLightVisible("thunder15", true);
SetLightVisible("thunder16", true);
SetLightVisible("thunder17", true);
SetLightVisible("thunder18", true);
SetLightVisible("thunder19", true);
SetLightVisible("thunder20", true);
SetLightVisible("thunder21", true);
SetLightVisible("thunder22", true);
SetLightVisible("thunder23", true);
AddTimer("", 0.13f,"Bang8off4");
}
void Bang8off4(string &in asTimer)
{
SetLightVisible("thunder1", false);
SetLightVisible("thunder2", false);
SetLightVisible("thunder3", false);
SetLightVisible("thunder4", false);
SetLightVisible("thunder5", false);
SetLightVisible("thunder6", false);
SetLightVisible("thunder7", false);
SetLightVisible("thunder8", false);
SetLightVisible("thunder9", false);
SetLightVisible("thunder10", false);
SetLightVisible("thunder11", false);
SetLightVisible("thunder12", false);
SetLightVisible("thunder13", false);
SetLightVisible("thunder14", false);
SetLightVisible("thunder15", false);
SetLightVisible("thunder16", false);
SetLightVisible("thunder17", false);
SetLightVisible("thunder18", false);
SetLightVisible("thunder19", false);
SetLightVisible("thunder20", false);
SetLightVisible("thunder21", false);
SetLightVisible("thunder22", false);
SetLightVisible("thunder23", false);
AddTimer("", 64.69f,"Bang9on");
}

//______________BANG 9 SERIES____________________

void Bang9on(string &in asTimer)
{
SetLightVisible("thunder1", true);
SetLightVisible("thunder2", true);
SetLightVisible("thunder3", true);
SetLightVisible("thunder4", true);
SetLightVisible("thunder5", true);
SetLightVisible("thunder6", true);
SetLightVisible("thunder7", true);
SetLightVisible("thunder8", true);
SetLightVisible("thunder9", true);
SetLightVisible("thunder10", true);
SetLightVisible("thunder11", true);
SetLightVisible("thunder12", true);
SetLightVisible("thunder13", true);
SetLightVisible("thunder14", true);
SetLightVisible("thunder15", true);
SetLightVisible("thunder16", true);
SetLightVisible("thunder17", true);
SetLightVisible("thunder18", true);
SetLightVisible("thunder19", true);
SetLightVisible("thunder20", true);
SetLightVisible("thunder21", true);
SetLightVisible("thunder22", true);
SetLightVisible("thunder23", true);
AddTimer("", 0.37f,"Bang9off");
}
//What? it cuts off here? There is a limit of text in this form? well this is what is needed to debug this problem, so can anybody help please? Thanks XD


RE: AddTimer infinite loop problem :( - palistov - 12-31-2011

Dear lord, you sure did that script the long way. XD

There's probably some spelling error you're overlooking, but what makes it hard to notice is the fact that you're doing in over 100 lines what you could be doing in maybe 15.

Try using a local variable to track which step in the entire lightning event you're at, essentially which "bang" is occurring. This way you can use a single timer function to loop itself, and once the variable reaches a certain point (in this case, 9) you can just stop the loop. I'll write it out so you can see how it'll work:


NOTE: Don't use this script until you've opened your map in Amnesia. I haven't tested it so I might have put a spelling error or some other error. Open your map, then paste this script in and see if it works for you. If you have any questions about how the script I wrote works, feel free to ask

PHP Code:
// stating the step, start at 0 so first repetition runs step 1
int BANG_STEP=0;
// should the loop continue?
bool bCONTINUE_LIGHTNING=true;

void BANG_LIGHTNING(string &in timer)
{
    
    
// add 1 to the event step
    
BANG_STEP++;
    
    
// if last bang occurred, break the loop
    
if(BANG_STEP==9bCONTINUE_LIGHTNING=false
    
    
// turn the lights on!
    
BANG_LIGHTS_ON(BANG_STEP);
}

// this is a float array - contains timer durations for pauses between lights on/off at each bang step
const float[] fPAUSE_VALUES={    0.25f0.35f0.37f,
                                
0.27f0.38f0.4f,
                                
0.19f0.33f0.28f
};

void BANG_LIGHTS_ON(int BANG_STEP)
{
    
// turn the lights on
    
for(int i=1;i<=23;i++) SetLightVisible("thunder"+itrue);
    
    
// wait a specific duration (unique to each ban step) until turning hte lights off
    
AddTimer(""fPAUSE_VALUES[BANG_STEP], "BANG_LIGHTS_OFF");
}

void BANG_LIGHTS_OFF(string &in timer)
{
    
// turn the lights off
    
for(int i=1;i<=23;i++) SetLightVisible("thunder"+ifalse);
    
    
// if not last lightning step, wait a random duration to play the next lightning bang
    
if(bCONTINUE_LIGHTNINGAddTimer(timerRandFloat(45.0f70.0f), timer);




RE: AddTimer infinite loop problem :( - jssjr90 - 12-31-2011

Well I kinda want to do it the add timer for all lights way, your scripting just seems a little out of my knowledge to comprehend. But thanks for the code though. Its weird though, everything should go as planed. All the "thunder" lights are synced just right to the audio file. This is a more simpler but long script to understand to me. It loops over and over on the Bang 1 series. Thats just odd, it can go though all the add timers on the bang 1 series and yet it cant even get to Bang 2 series, it just wants to go back to bang 1 series and loop that. Strange.
Yep, just as you stated, one of the add timers had the wrong number, thus getting it confused. All fixed now, just had to adjust the numbers of addtimers for the next bang. Too bad when your reading notes and stuff the sound still plays. oh well. Im happy now.