How do I respawn my character with full health

Get help using Construct 2

Post » Wed Aug 19, 2015 6:06 pm

I'm currently making a platform game but I'm having problem with my respawn.

What I did is when the player dies .. the layout will be reset.

It went well but the HP I still set to 0 when the layout reset.

Oh btw I have a "MaxHealth" global variable .. if that helps

I dunno but I'm pretty darn new to the art of making game.

If someone can offer solution or advice pls do <3

Thank you
B
5
S
1
Posts: 14
Reputation: 409

Post » Wed Aug 19, 2015 6:14 pm

When you spawn the player set the variable to 100%.
So it will look like :
---------------------------
ON start of layout - --system--Set health 100
-------------------------------system--Spawn the actual player sprite at X64 ,Y64

make sure you poke the value before you spawn the sprite or he will be "still born",and dead on birth.
B
29
S
8
G
4
Posts: 767
Reputation: 5,985

Post » Wed Aug 19, 2015 8:48 pm

If you have a maxhealth variable I'd use that rather than hardcoding the number per above. That allows you to add extra health for level-ups etc.
B
6
S
1
Posts: 7
Reputation: 418


Return to How do I....?

Who is online

Users browsing this forum: boybacteria, Microbex, Phacanu, richcoz81 and 27 guests