How To Trigger The Next Scene After All Enemies Are Defeated In Bb3?

Discussion in 'How Can I...?' started by Smyers74, May 6, 2020.

  1. Smyers74

    Smyers74 Boxer

    Joined:
    Feb 25, 2018
    Messages:
    3
    Likes Received:
    0
    I've started a game where the goal is to clear out all the spawning enemies on each level/scene. Once all the enemies have spawned and have been destroyed, this would then trigger the next scene. Rinse & repeat for multiple levels/scenes.

    I've come across a couple of older threads on how to do this in BB2, but am unsure how to accomplish this in BB3.

    I've thought about using the delay node to spawn a specific enemy for last which could trigger the next scene with an "If Collide" node, but the problem with this is there is high potential for the player to destroy this enemy before all the other enemies have been cleared. I would like to be able to clear the enemies in any order, and using this delay option to make sure there is a specific last enemy to be cleared really ruins the flow of the gameplay IMO.

    Any ideas?
     
  2. visionarymonkey

    visionarymonkey Boxer

    Joined:
    Apr 16, 2018
    Messages:
    96
    Likes Received:
    32
    I think you could use a global counter node. Each time an enemy is destroyed it will trigger the counter. Once the counter reaches a certain number you could trigger an event observer.
     
  3. Smyers74

    Smyers74 Boxer

    Joined:
    Feb 25, 2018
    Messages:
    3
    Likes Received:
    0
    Thank you! I’ll give it a try.
     

Share This Page