Some issues i have with Healthbars on Enemies

0 favourites
  • 5 posts
From the Asset Store
HealthBar
$19.99 USD
Advanced, customizable, visual bars to present amounts of points such health, mana, stamina and more
  • So i have a system, in which at the start of the layout for each the same type of enemy it creates a healthbar above it, now i set it to only create 1 doing the start of the layout.

    in order to make the healthbar follow the enemy ive set it to

    Every Tick: set Enemy Healthbar position to "Enemy.X and Enemy.Y"

    this is how the healthbar follows it and it may be of importance to the problem.

    now whenever one of the specific type of enemy is killed it sets its position to another enemy of the same type.

    On Enemy "Health" Equal or Less to 0: "Enemy" Destroy

    if i set the healthbar to destory with the enemy, it instead just destorys all of the healthbars, the code is:

    is there a way to make the EnemyHealthbar Destroy with the Slayed Enemy without Destorying the other Healthbars on other Enemies?

    i hope i descriped this as well and is understandable, and idk if there is a way to take screenshots of the instances and actions on the event sheet.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Make use of 'Containers'. If you put the enemy and health bar in a container, they will be created together when you say create Enemy. They are also destroyed together. So when you destroy Enemy, the health bar instance linked to that Enemy will be destroyed. This avoids any convoluted picking as they are always related.

  • does it work to if the Enemy is already in the layout at start of layout?

  • Yes you can leave the solo enemy and the health bar will be automatically created. The positioning you would have to sort yourself such as 'health bar on created' set position to enemy.imagepoint(1) for example.

  • alright i did everything you said, and it worked, thank you so much for your help ^^

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