0 Favourites

Stop spawning creatures after hive is destroyed?

  • 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" />

  • Construct 3

    Buy Construct 3

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

    Buy 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)
Similar Topics Posts Views Last Post
Unread hot topic
34 6,316
kmoon11's avatar
kmoon11
Unread hot topic
41 3,218
Napelazam's avatar
Napelazam
Unread hot topic
37 1,968
newt's avatar
newt