How do I create a spawner that stops spawning when destroyed

Get help using Construct 2

Post » Fri Oct 21, 2016 5:40 am

In my events sheet, I have a red spaceship spawning at a certain location every 6 seconds. It looks like this:

system: every 6 seconds system: spawn red spaceship

Then I added a red portal to the spawn area, which is 200, 200 (x and y). I then added another event:

red portal: on destroyed red spaceship: destroy

How do I change it such that it is fixed?
B
5
S
1
Posts: 13
Reputation: 351

Post » Fri Oct 21, 2016 6:33 am

You should spawn the spaceship from the portal. When a portal destroyed, it should no longer spawning spaceship. Is that what you want?
ImageImage
B
105
S
46
G
23
Posts: 778
Reputation: 22,226

Post » Fri Oct 21, 2016 12:39 pm

Yes! Thanks for the help!
B
5
S
1
Posts: 13
Reputation: 351

Post » Fri Oct 21, 2016 1:06 pm

Just for learning sake... you could also use a variable.
on start - spawneralive = 1

In the spaceship spawn event condition spawneralive = 1.

When spawner destroyed add action - system set spawneralive = 0.
Check out my completed games on the Arcade! Capt. Doe Save the Universe! & Clicker Wizard!
B
66
S
17
G
8
Posts: 637
Reputation: 9,370

Post » Fri Oct 21, 2016 1:17 pm

Ok, thank you too!
B
5
S
1
Posts: 13
Reputation: 351


Return to How do I....?

Who is online

Users browsing this forum: fearfulelephants and 22 guests