How can i give a health bar to every child.

I have a quite simple heathbar:

For the enemy health is being retrieved from an object reference variable stored in the parent here which is set on begin play. The level is instance editable and set to 50.

Now i want the healthbar to be visible on all children so ive used this:


with just this inside enemy health bar:

BUT
the healthbars spawn as normal but are not set to what they are ment to be

getting this error

The damage system contains this, “ai healthbar” cointaining this:
image

please help

This seems to be overcomplicated.

  • a widget updates its progress bar:

  • in the AI base class → get hit, calculate health, send it to the widget:

That’s pretty much it. Not sure if I got the rest - you want to tie enemy health to the current level? So same guys in the next level have more health? If so, have the Game Mode feed the spawned actors new health values.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.