How do I end the shooting when the ammo hits zero?

Get help using Construct 2

Post » Wed Dec 31, 2014 5:30 am

I want to end the shooting when my ammo global variable hits zero. I've tried to destroy the ammo when the variable is zero but it also destroys the current bullets on screen. What I want it to do is when the global variable is zero stop shooting and i want the bullets to continue on the screen. Any help?
B
29
S
9
G
3
Posts: 18
Reputation: 3,267

Post » Wed Dec 31, 2014 5:55 am

Well, just add a check for whatever is spawning the bullets, like If Ammo > 0 then Every 0.2 seconds spawn bullets.
B
19
S
6
G
6
Posts: 1,101
Reputation: 5,646

Post » Wed Dec 31, 2014 6:01 am

if you are using turret behavour

if ammo = 0 then | turret turret:settings/ set enabled [disabled]
B
7
S
1
Posts: 28
Reputation: 481


Return to How do I....?

Who is online

Users browsing this forum: adventurist, brunopalermo and 36 guests