Repeat for Each Instance issue, not applying to all at once - SOLVED

I am trying to create a space invaders type game for my kids to play, and I’m struggling to make this movement work.

I have a Scene variable called WaveOneDirection with either Left or Right in it, then an instance variable called Wave on the EnemySM object and a border that is being checked for collision. I want the objects to move as a group like in the actual game, and all at once. Left and right work fine, but when a collision is matched, all of the EnemySM objects are not moving down the 16px like I expected from the event sheet.

This is the event sheet.

The column that collides moves down, but i thought the Repeat for each instance would apply to all of them at once. How else can I accomplish this, what dumb mistake am I making? I would put another image, but new users can only post one.

Thank yall so much for the help! I look forward to learning.

Here is that movement image, notice the right column shifted down, but not all of em.

Repeat for each instance only iterates over picked instances (if there are none, it picks all). Instead of using repeat for each object, just add a subevent and say pick all instances. Then you can move them all down.

1 Like

Yarr Genius! Thank you so much. Working much better now. Makes sense your explanation too.

For those concerned, I also changed the “Change the position of” to be a reference to an instance variable Speed

EnemySM.Variable(Speed) * TimeDelta()

Thanks again and love the vibe of the community.

1 Like