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
36
S
9
G
1
Posts: 66
Reputation: 2,592

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
60
S
20
G
56
Posts: 1,077
Reputation: 35,941

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
27
Posts: 2,440
Reputation: 20,344

Post » Thu Dec 22, 2016 3:04 am

Thanks Guys I will try this.
B
36
S
9
G
1
Posts: 66
Reputation: 2,592

Post » Thu Dec 22, 2016 4:12 am

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


Return to How do I....?

Who is online

Users browsing this forum: chrisyamao, ksiads and 5 guests