Step 6: Enemy Movement
Just as you can rename alterable values and strings, you can rename global values and strings. Check the Application properties, you will notice Global Value A has been renamed Enemy Direction.We are storing the direction in a global string, as opposed to the built-in direction value of each Enemy, so that all Enemy objects will move in the same direction.
- Enemy Direction = "Left"
: Set X position to X( "
" )-1
- Enemy Direction = "Right"
: Set X position to X( "
" )+1
- X position of
< 30
: Set Enemy Direction to "Right"
- X position of
> Frame Width-30
: Set Enemy Direction to "Left"

This is because MMF2 executes all events sequentially and we positioned the wing objects and then moved the body. Simply move these 4 events above the 2 events we made in Step 3 to fix the problem.
9