How do I Static healthbar over enemy head.

0 favourites
  • 4 posts
From the Asset Store
HealthBar
$19.99 USD
Advanced, customizable, visual bars to present amounts of points such health, mana, stamina and more
  • Please help me, my enemy have working health bar, my only issue is that when my enemy is using another animation the health bar is moving of position too, i want static health bar over the head of my enemy, so my enemy will walk without moving the healthbar too over their head, i am using set position enemy.ImagePointX("health") and enemy.ImagePointY("health") , but my animations have different sizes, i tried to put the same image point position to all my animations and obviously the healthbar is moving with the character then i tried to assign manually the same position of my idle animation ( image point X 47 Y-105 ) to all my animation and didn't work.

    The only way to do this was manually edit the image point with my mouse example X 47 Y-105 is the image point position (health) of my idle animation and X 58 Y -113 is the same static position of the image point in my walk animation, i tried "apply to all animation" option but didn't work, the only way to do this is manually?? i have a lot of animation with different sizes and its very hard do this manually with the mouse because isn't precise, and the position X and Y are different with each animation, i cant just put the same X and Y in all animations.

  • scirra.com/manual/99/pin

    i tried pin before and didn't work because the health bar have the origin point on right side and i cant change it because every damage point will reduce the with of the healthbar, and the healthbar for some reason with pin behavior its on bottom, i want on top, the pin behavior is using the origin point of my animation and all my animations have the origin point on bottom, i cant change it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • i think i solved it, i just created an empty sprite and i set the position of the empty sprite to the character, then i put the position of the healthbar in the image point "health" of the empty sprite, because the empty sprite dont have animations with different sizes now the healthbar dont move it, if someone have the same problem as me this is the solution.

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