Stop spawning creatures after hive is destroyed?

Get help using Construct 2

Post » Tue May 21, 2013 2:19 am

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.
B
8
Posts: 42
Reputation: 1,009

Post » Tue May 21, 2013 2:55 am

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)
B
11
S
2
G
2
Posts: 26
Reputation: 2,974

Post » Tue May 21, 2013 6:37 am

Awesome, that worked well! Thanks bigpappapuck.
B
8
Posts: 42
Reputation: 1,009


Return to How do I....?

Who is online

Users browsing this forum: DemantDigitalArt and 21 guests