I think linking order may have an affect. Try Link [object] to slime, where object is slimeShadow, enemyHpBar and enemyHp.
Alternatively, if slime doesn’t rotate, consider the Sticker extension. You place the objects relative to the slime object, and then stick the objects to the slime. No need to reposition when the slime moves, the extension does all that for you.
Thank you for the suggestion!
But it wouldn’t work exactly, as I want the enemyHp to change its width according to the slime’s hp too, not just position
I tried changing the order, and nothing changed
Yes, but that’s the problem, because it doesn’t show the slime’s health, because the width doesn’t change
Only the first instance of the slime (the one on the left) works perfectly for some reason
Ok, then add a unique id to both the slime and the HP bar (same id value for te bar and slime). Or link those two, for the purpose of updating the width.
You don’t need the always; an unconditional event is always actioned.
Replace the Always event with a For Each Slime. Because the current problem you have is that there are no conditions that specify which slime the linked objects belong to. So GDevelop will just take the first one on it’s list.