OVERVIEW:
Create Objects
The body parts are created and positioned in the level editor, while the wing objects are created during runtime with a fast loop at the start of the level.
Enemy Movement
Every enemy is always moving in the same direction, left or right. When any enemy reaches the screen edge, they all turn around.
Player Movement
Pressing left or right moves the left or right player 2 pixels, providing it is within 10 pixels of the edge.
Matching Enemy Body Parts
The enemy body parts are positioned and destroyed accordingly using spreaded ID values
and MMF2's widely unknown yet very powerful automatic pairing feature. This is the primary focus of the tutorial.
ALTERABLE VALUES:
Enemy
Alterable Value |
Default |
Description |
LeftWingID |
0 |
This tells us which Left Wing to pair with this Enemy. |
RightWingID |
0 |
This tells us which Right Wing to pair with this Enemy. |
Left Wing
Alterable Value |
Default |
Description |
ID |
0 |
This tells us which is the parent Enemy. |
Right Wing
Alterable Value |
Default |
Description |
ID |
0 |
This tells us which is the parent Enemy. |
GLOBAL STRINGS:
Global String |
Default |
Description |
Enemy Direction |
"Left" |
The direction that all enemies are moving. |
3