how to stop bullet firing when player destroyed?

Get help using Construct 2

Post » Tue Dec 20, 2016 6:11 pm

Hi ,
I am doing the space shooter game,
and using the event "every second"-"create object" bullets (player X +10,player Y+10)
it is working nicely, but when player destroyed,
and if I pressed the left mouse button the firing is continuing on the screen and I want to stop that when player destroyed. please can any one help me to the solve the issue.
B
38
S
9
G
1
Posts: 74
Reputation: 2,660

Post » Tue Dec 20, 2016 6:26 pm

Just make a variable. If player is var_alive then "every second"-"create object" bullets (player X +10,player Y+10)
Change variable to var_dead when he dies.
B
61
S
20
G
56
Posts: 1,077
Reputation: 35,986

Post » Tue Dec 20, 2016 9:16 pm

You say the player gets destroyed?

You could also try: Player - is on screen (sub event on left mouse clicked - Fire bullet.
B
38
S
18
G
19
Posts: 664
Reputation: 14,107

Post » Tue Dec 20, 2016 10:21 pm

Dont create, let the player spawn.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Thu Dec 22, 2016 3:04 am

Thanks Guys I will try this.
B
38
S
9
G
1
Posts: 74
Reputation: 2,660

Post » Thu Dec 22, 2016 4:12 am

I use player variable and resolve the issue. Thanks a lot! :) Guys
B
38
S
9
G
1
Posts: 74
Reputation: 2,660


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 36 guests