How do I respawn my character with full health

0 favourites
  • 3 posts
From the Asset Store
Custom animated Health Bar - check youtube video to make it yourself
  • 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

  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)