What makes this more difficult is that I have more than one object of the same type. Let's say I have a type of objects called "Monster" and another type called "Health Bar". I want every monster to have a health bar, and it should be displayed above the monster's head at all times. But how can I make a unique health bar for each monster, and then make sure they're all at the right position?
Ideally, this should be done in an efficient manner so that the position of health bars will only be set when it must be set. I don't want a loop that runs every tick and sets the position of every health bar on the level. I would like to only move health bars for the monsters that have moved that tick; stationary monsters don't need to move their health bar.
Any help with this would be appreciated.