GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Resetting a Timed Spawn Actor

aquamonkeyaquamonkey Posts: 36Member, PRO

I have an actor on a scene that spawns enemies on a few timers. How do you reset the spawning actor to start over and destroy the enemies that were previously spawned on the scene after the level fails and player goes to retry the level? When a level is failed, I have a Game Over scene with a retry button which resets the score and actor positions, but the spawning and timer continues from where it left off. I've tried retriggering the spawn timer when a Reset attribute, i.e. Spawn when Reset is False, when level fails, go to Game Over scene, retry button changes Reset to True, when scene changes, an actor changes Reset back to False...doesn't work.

Comments

  • aquamonkeyaquamonkey Posts: 36Member, PRO

    Ok, figured this one out...when the retry button triggers Reset to true, I had in my enemy actor, when reset is true, then destroy this actor. That's still not working, but I also had an unpause scene with a change scene within the retry button. When I removed the unpause scene and just kept change scene (back to the failed level), the scene resets, thus removing all the actors that were left spawned on the screen before the scene restarts.

Sign In or Register to comment.