Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Strange freeze using a sequence
Vic7im Offline
Junior Member

Posts: 44
Threads: 9
Joined: Sep 2012
Reputation: 3
#1
Strange freeze using a sequence

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)
(This post was last modified: 10-29-2012, 03:54 AM by Statyk.)
10-28-2012, 05:59 PM
Find




Users browsing this thread: 1 Guest(s)