change in this code to prevent that from happening again? Note that the player can still take damage after the state, but just passes through the monsters when moving.
Code: Select all
Pain.Sports:
STUD H 1;
TNT1 A 0{
cam = Spawn("BackCamera",pos);
cam.target=self;
}
STUD I 1 A_Playsound("student/thanks");
Goto Squats;
Squats:
STUD JKL 10 {
squatcount++;
Thing_Stop(0);
SetPlayerProperty(0, 1, PROP_FRIGHTENING);
SetPlayerProperty(0, 1, PROP_TOTALLYFROZEN);
SetPlayerProperty(0, 2, PROP_INVULNERABILITY);
}
TNT1 A 0 A_JumpIf(squatcount < 250,"Squats"); //Loop the animation if the condition has not been met
STUD E 1 {
squatcount=0; //Reset the counter
A_Jump(256,"see");
A_Playsound("bostan/PushUps");
SetPlayerProperty(0, 0, PROP_FRIGHTENING);
SetPlayerProperty(0, 0, PROP_TOTALLYFROZEN);
SetPlayerProperty(0, 0, PROP_INVULNERABILITY);
}
TNT1 A 0{
SetCamera(null);
cam.Destroy();
}