Stop spawning creatures after hive is destroyed?

0 favourites
  • 3 posts
From the Asset Store
5 glow creatures with size, shape and color variations.
  • Hi all! In my platform game I have an enemy hive that has creatures spawning behind it every 3 seconds. I set up the hive to be destroyed when I stomp on top of it, but I don't know how to stop the creatures from spawning once it's gone. My 2 separate events look like this:

    1. (<system> every 3 seconds) = (<system> create object <creature>)

    2. (<player> on collision with <hive> + Y < 820) = (<hive> destroy)

    What kind of event could I create to stop the creatures from spawning once the hive is destroyed? Any help would be greatly appreciated! Thanks. <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Create global variable = HiveAlive and set equal to 1

    change

    1. (<system> every 3 seconds) = (<system> create object <creature>)

    2. (<player> on collision with <hive> + Y < 820) = (<hive> destroy)

    to

    1. (<system> every 3 seconds)

       (HiveAlive = 1)

    = (<system> create object <creature>)

    2. (<player> on collision with <hive> + Y < 820)

                            = (<hive> destroy)

                              (set HiveAlive to 0)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Awesome, that worked well! Thanks bigpappapuck. <img src="smileys/smiley16.gif" border="0" align="middle" />

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)