Stop spawning creatures after hive is destroyed?

0 favourites
  • 3 posts
From the Asset Store
Humanoid Creatures 2
$14.50 USD
50% off
Complete the collection by purchasing Humanoid Creatures.
  • 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" />

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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)

  • 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)