How do I rest life from one enemy instance?

Get help using Construct 2

Post » Wed Jun 25, 2014 3:53 pm

Hi friends,

I made an enemy which has life as an instance variable. In this specific case: 2 hits.

So when something hits the enemy, it's life goes down by one and, when life = 0, it dies.

Now, if I spawn two of them, only one seems to handle the instance. Could someone show me how to do this correctly?

And how to make a different lifebar for each instance of enemy, if that's possible.

Thank you very much.
B
5
S
1
Posts: 38
Reputation: 520

Post » Wed Jun 25, 2014 3:57 pm

You must pick the correct instance before applying the damage. I'm not sure how you're handling it, so a .capx would be nice. :)
Bruno

I like to eat, but I'm no cook. Why liking to play games would make you a game designer?
B
22
S
6
G
3
Posts: 718
Reputation: 4,008

Post » Wed Jun 25, 2014 4:44 pm

I have this example https://dl.dropboxusercontent.com/u/123 ... index.html

I dont know if is exactly what you want. If is, the capx is here:
https://dl.dropboxusercontent.com/u/123 ... /game.capx
-- Ze - Z - Zé --
B
20
S
4
G
1
Posts: 26
Reputation: 1,983

Post » Thu Jun 26, 2014 8:57 am

That's exactly what I want. I'm looking for a way to include it in my game. Thank you VERY much.
B
5
S
1
Posts: 38
Reputation: 520


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 10 guests