Put around for each instance

hi I’m trying to put health object around each instance of enemy snake but the health is only around one of the enemies?

events

The trigger once is causing only one enemyhealth object to be created. The event has been fired, it won’t fire again (no matter what enemysnake object is being iterated over).

Remove the trigger once, and put the repeat event under a “Beginning of scene”, or create the enemyhealth object when the enemysnake object is created.

thanks I tried for each under beginning of scene and also placed the enemy health on the scene but still not working?

events

You’ll need to link the enemysnake and it’s enemyhealth in the first event, and loop through each enemysnake and get the linked enemyhealth for the second event.

Otherwise GDevelop will just put all the enemyhealth obejcts round one of the enemysnake objects.

But it looks like you’re just positioning the enemyhealth at the same spot relative the the enemysnake. If so, why not use the sticker extension (though I’m not sure how that will work if you flip the image)?

1 Like

yep not linking the objects was the problem and is working now thank you! I haven’t used sticker extension I can check it out.

working events

1 Like