I've been testing out switch case Statements to make random scares.
I've used this tutorial:
https://wiki.frictionalgames.com/hpl2/tu...dom_scares
And I get a Unexpected End of File error. (Yes I know I haven't put anything in the cases.)
void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "Scare", true, 1);
}
void PlrCollideSwitch(string &in asParent, string &in asChild, int alState)
{
int x = RandInt(1, 5)
switch(x)
{
case 1:
//Scare 1
break;
case 2:
//Scare 2
break;
case 3:
//Scare 3
break;
case 4:
//Scare 4
break;
case 5:
//Scare 5
break;
}