How to stick health bar on top of a character?

0 favourites
  • 9 posts
From the Asset Store
Health, Weapon & Rage Bars for your Games. Easy to use & Customize.
  • I have tried to add a new layer for the health bar and place on top of all layer, after that I have set the parallax to 0,0 but seems not working...Any solution for this one?

  • You can use Pin behavior

  • You can use Pin behavior

    Can you please provide steps for me?

  • > You can use Pin behavior

    Can you please provide steps for me?

    Add Pin behavior to the Health bar sprite.

    Create the event:

    On create: Health bar -> Pin to Object (Player)

    Done

  • The steps outlined above, are if you want the health bar to float above or overlapping the player sprite(Depending on the image point of the sprite). If you simply want it on the top "GUI" layer, and stationary in one position. It should work, the way your first post mentioned.

  • > > You can use Pin behavior

    >

    > Can you please provide steps for me?

    Add Pin behavior to the Health bar sprite.

    Create the event:

    On create: Health bar -> Pin to Object (Player)

    Done

    I have actually tried this before but seems not working...

    Is it on the event sheet: health bar > health bar is pin> health bar> pin to an object?

  • The steps outlined above, are if you want the health bar to float above or overlapping the player sprite(Depending on the image point of the sprite). If you simply want it on the top "GUI" layer, and stationary in one position. It should work, the way your first post mentioned.

    I don't want the health bar to stick on top corner of the interface, I just want it to stick on top of a player when the player is moving to any place

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Guys, I have found a solution myself and it works! On event sheet: system> on start of layout> Pin to object> choose the character

    Anyway, thanks for those who replied as well!

  • > The steps outlined above, are if you want the health bar to float above or overlapping the player sprite(Depending on the image point of the sprite). If you simply want it on the top "GUI" layer, and stationary in one position. It should work, the way your first post mentioned.

    I don't want the health bar to stick on top corner of the interface, I just want it to stick on top of a player when the player is moving to any place

    Alrighty. So the steps that KryptoPixel laid out would be perfect for this instance. You can adjust the image point on the health bar, or make another image point on the player character to pin it to. Then make adjustments to that point's orientation in the sprite editor, to position it in relation to your player, where you would like it to be :)

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