How do I create a health system using hearts?

Get help using Construct 2

Post » Wed Mar 18, 2015 7:08 pm

Hey, I'm new to construct 2 and I am creating a platform game for my final year project at university. Instead of using a health bar in my game I would like to use hearts or another shape to represent the character's health. When the character is hit, it will lose one heart. I have found some tutorials on this topic but they were not made for a platform game so I do not know how to apply it to my own.

Image

Also, is there a way I can combine different event sheets for different levels and title pages?

Thanks
B
7
Posts: 16
Reputation: 313

Post » Wed Mar 18, 2015 7:47 pm

Instead of using a "Healthbar" you should use a sprite with several frames or several animations, where each frame or animation has one heart less than the other. Then when the character gets hit you set the frame to correspond to the amount of lives left.

Another idea, would be to have one heart-sprite per life, and make it visible or non visible.

About the event sheets, you can include event sheets in another sheet. See more here: https://www.scirra.com/manual/121/event-sheets
Frosty Elk AB
www.frostyelk.se
Have no fear, We come in peace!
B
13
S
3
G
1
Posts: 106
Reputation: 1,169

Post » Wed Mar 18, 2015 8:47 pm

How would I tell the game to play the next frame if the character is hit again? Right now I have: when character collides with enemy, play frame 1
B
7
Posts: 16
Reputation: 313

Post » Wed Mar 18, 2015 8:48 pm

And thanks for the events sheet link, it worked perfectly
B
7
Posts: 16
Reputation: 313

Post » Wed Mar 18, 2015 11:40 pm

I have an "outside the box approach" :)

Use a black rectangle sprite with with its opacity set to 50% (or whatever) and place it in the black area to the right of the hearts graphic and incrementally change its X value by half heart widths moving it to the left with each damage taken slowly covering the hearts graphic.. moving right as healing done etc..
Check out my completed games on the Arcade! Capt. Doe Save the Universe! & Clicker Wizard!
B
51
S
14
G
8
Posts: 593
Reputation: 8,558


Return to How do I....?

Who is online

Users browsing this forum: Ethan, kabaal, oddreal, raulcg1981, SondeepH, TL22 and 8 guests