Space Invaders Game! X Problem

Good Morning!

I’m trying to create a game like Space Invaders in App Inventor.
I am creating the movement of the enemy ship. The idea is 4 ships next to each other moving on the X axis. enemies1

When the ships touch the edge, the enemy ships return in the opposite direction. However, when the movement is repeated many times the ships end up coming together. enemies2

Could someone help me with the movement? I would like that when the sprites touch the edge they do not approach, but keep their distance from each other!

From your symptoms, it sounds like the EdgeReached event is firing in the middle of a Move_Enemy Timer event, causing a different global EnemiesSpeed value to be applied to the last part of the global AllEnemiesListComponents list.

An easy fix to try …

In the MoveEnemy Timer event, initialize a local copy of the global EnemiesSpeed variable, and use that for your X nudges.

how I do that? add a set global "EnemiesSpeed" to 5??


Thank you!

Make it easy for me to edit your blocks in the Blocks Editor by doing a Download blocks on just the when MoveEnemy Timer event block and upload it here.
It will save me from having to rebuild it from scratch.
(12 minutes to my supper bell)