Exit scene once [X] amount of enemies are killed...

sebstarr

  • *
  • Posts: 259
I'm wanting to add a stipulation to my game. If you have say 10 enemies on a level, you will have to kill at least 6 of them to be able to leave the scene.

I know that some people have done this in the past where it switches the scene automatically. But I'm wanting the user to have to make it to the end of the scene for them to exit the scene. Until they kill 6+ enemies, they will be unable to leave.

rob1221

  • *
  • Posts: 9472
In an actor behavior attached to each enemy, increment a game attribute by 1 in when created.  When an enemy is killed, decrement the game attribute by 1.  When the player reaches the exit, check the game attribute to determine whether or not to advance to the next scene.