Step 1: Create Enemy objects on mouse click

For the purpose of this tutorial, Enemy objects will be created simply by clicking the screen. Left clicking will create an Enemy facing right and right clicking will create an Enemy facing left.
Every Active object has a hard-coded direction value ranging from 0 and 31. Left is 16 and Right is 0. We want to be able to set the direction of each Enemy but we can't use this built-in value because our skins are stored in animation directions and changing direction will change the skin. So instead, we use an alterable string, renamed Direction.


If you test the application you will notice that wherever you click, the Enemy the X position is 0. This is because at this point, X Float is a plain old alterable value that means nothing.
4