Evening y' all \o
I'm having problems with a script sequence, the goal is to make stuff appear at different times.
The problem is that I don't get any errors but the game freezes (or runs with absurd stuttering) the moment the script activates.
Anyway, here's the script. Thanks in advance for your help.
Spoiler below!
void AppearingStuff (string &in asTimer)
{
AddLocalVarInt("iSlimes", 1);
float partSpeed = 0.5f;
SetLightVisible("RedLight", true);
switch (GetLocalVarInt("iSlimes"))
{
case 1:
SetPropActiveAndFade("Slime_0", true, 0.5);
SetPropActiveAndFade("Slime_1", true, 1);
SetPropActiveAndFade("Slime_2", true, 2);
SetPropActiveAndFade("Slime_3", true, 2.5);
SetEntityActive("DSM_1", true);
break;
case 2:
SetPropActiveAndFade("Slime_4", true, 0.5);
SetPropActiveAndFade("Slime_5", true, 1);
SetPropActiveAndFade("Slime_6", true, 2);
break;
case 3:
SetPropActiveAndFade("Slime_7", true, 1);
SetEntityActive("DSM_2", true);
break;
}
if (GetLocalVarInt("iSlimes") <3)
{
AddTimer("", partSpeed, "AppearingStuff");
}
}
Edit:Nevermind, added a proper timer instead of calling it from the float variable and it worked. (can't delete the thread somehow XD)