Zelda Type Heart Containers?

Get help using Construct 2

Post » Wed Aug 22, 2012 1:13 am

Setting up a sorta heart health system, at first I used a tile background and just increased and decreased the size, but now i want the hearts to sorta "pop" when u get hit so I have to use sprites, ive tried a few didnt ideas but couldnt figure out how to get it working correct. Any suggestions?
B
4
Posts: 15
Reputation: 355

Post » Wed Aug 22, 2012 1:19 am

First thought would be a sprite with different animation frames. One frame for each state of the sprite. Each frame represents the state of health. That way you can have as many hearts as you need.
B
4
G
2
Posts: 12
Reputation: 1,249

Post » Wed Aug 22, 2012 1:22 am

Yea i have done that, and i clones that sprite but when he gets hit it makes all of them pop, not just one.
B
4
Posts: 15
Reputation: 355

Post » Wed Aug 22, 2012 3:26 am

You have to use instance variables as well so each heart has it's own amount of HP (hit points). You can create as many instances of the container as you want now.

Here is a capx. Let me know if everything is clear, Zelda-like Heart Containerssilvrbak2012-08-22 03:43:34
B
4
G
2
Posts: 12
Reputation: 1,249

Post » Wed Aug 22, 2012 3:57 pm

Sent you a PM with my capx. Still learning, so maybe i messed up something some how.
B
4
Posts: 15
Reputation: 355

Post » Wed Aug 22, 2012 4:49 pm

[QUOTE=unrivaledneo] Yea i have done that, and i clones that sprite but when he gets hit it makes all of them pop, not just one.[/QUOTE]

You're luck today!

Read this two tutorials and you'll be able to do manipulate each heart individually.

http://www.scirra.com/tutorials/361/understanding-uid-iid-health-of-enemies-and-rocket-smoke-trail

http://www.scirra.com/tutorials/355/making-character-composed-of-multiple-parts
ImageImageImageImageImageImage
B
93
S
19
G
12
Posts: 1,209
Reputation: 18,357


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 14 guests