[SOLVED]How do I destroy instances of a object with countdow

Just started using Construct 2? Post your questions here

Post » Sat May 06, 2017 10:15 am

Hi all!

I want destroy instances of a object the player spawn in game with button. Then every instance have a quantity of energy and every second the system substract 1 of energy. I want destroy the instance when their energy get zero. The problem I found now is that I have created some instances and when one of them get zero energy all instances are destroyed... any idea?
Last edited by Tarkion on Sun May 07, 2017 7:09 am, edited 1 time in total.
B
17
S
5
G
2
Posts: 173
Reputation: 2,085

Post » Sat May 06, 2017 10:44 am

event
for each player object
sub event
player.energy <= 0 destroy player
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,567

Post » Sat May 06, 2017 5:15 pm

lennaert wrote:event
for each player object
sub event
player.energy <= 0 destroy player


Thanks very much lennaert!! now works fine! ;)
B
17
S
5
G
2
Posts: 173
Reputation: 2,085


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 0 guests