Position object above another

In my game, enemies can get a slowness debuff, which slows them down. To add a bit of visual feedback to the player, I decided to have a snail icon hovering above the heads of each enemy affected. I decided to do this with a function.

However, it does not appear to be working properly. Instead of hovering above their heads, it is created above their heads, but it does not stay above them. The enemy moves around, but the icon stays in place. Also, the snail icon is created off-centered to the object, and the parameters of SlowGuy.X and .Y will not accept “Center” to be used.

How do I make the snail icon hover above EACH enemy when the function is triggered? And how do I center it? Also note that each enemy is in the same group, so SlowGuy.Height() will have to be used to that the icon hovers properly above each enemy of all sizes.

Thanks in advance.

I would give a custom behavior to the icon so that it is repositioned each frame above the enemy.

How do I do that? I tried this so far, but the icon only appears for one frame, then vanishes.

You need to pass as behavior parameter the frozen guy object it needs to be upon, use the onCreated function to link this particular object to the object this behavior is applied to, and add in the action as first action “take in consideration linked objects”. And you actually want to set the position in doStepPostEvents.