How to get an object to move around each instance of a sprite

I’m spawning multiple animals, and I need a circle to follow each instance of the animal. I only have one puppy sprite, and but I create 4 of the puppy objects on screen when the character hits a trigger hit box, and triggers the object creation.

But when the puppies are created, the circles that get created for each puppy gather up in one spot, as the puppy moves like this.

What I need is for the circles to follow each puppy instead of being bunched up in one position.

Here is my code, how do I make sure the circles follow each puppy rather then a single position?

You can try using the “Sticker” extension to stick the circles to the puppies, and that’ll handle the movement of the circles for you: Stick objects to others [GDevelop wiki]

Alternatively (or in addition to that), you should “link” the circle object to the puppy: Linked Objects [GDevelop wiki]
As it is currently, you’re moving all circles for each puppy. Whereas you only want to move one circle for each puppy.

So when you create a circle, you’d add an action to link it to the puppy. Then in your puppy repeat event, you’d add a condition to take all linked objects into account. Then it’ll only move the circle linked to that specific puppy.

Hope that helps.

1 Like

Okay, thanks alot, yes it does help tremendously. I didn’t know there was a possibility to stick or link objects.