I placed a Checkpoint at the beginning of one of my maps, expecting the level to be reset to what it was when you crossed it on the event of your death. The checkpoint works like I assume it should (the death hint shows), but the level is just as it was when the player dies. Which is a huge problem because the player's path is blocked continually as he progresses through the level.
How can i get everything to be reset when the player spawns?
(NEVER MIND, I'M DUMB)
Well it took an absolute novel's worth of additional scripting but I was able to have everything in the level reset, except for entities that have been moved by the player. Thanks for your help!
Alright, facing a new problem on this. The level successfully resets so long as all my timers have finished running, but if the player dies while the timer is still running, it keeps going and blocks the player from advancing. It's a timer sequence, so I wonder if that has something to do with it.
switch(GetLocalVarInt("GuardianStep2")) {
case 1:
CreateParticleSystemAtEntity("","ps_break_cavein.ps", "AreaGuardianCavein", false);
StartScreenShake(0.1f, RandFloat(0.15f,0.6f), 0, 0.1);
PlaySoundAtEntity("", "explosion_rock_large.snt", "AreaGuardianCavein", 0, false);
break;
[BOLLY, ANOTHER ROUND OF CASES MY FRIEND]
}
if(GetLocalVarInt("GuardianStep2") < 11) AddTimer("guardian2", fEventSpeed, "TimerGuardian2");
}
So yeah, that's everything. Like I said, if the two sequenced timers have stopped running, everything resets the way it should and runs again properly when I go through the level a second time. However, if the player dies while the sequences are still going, they are still going when the level resets too.