Const DIRECTIONLEFT = 1 ;When direction is left
Const DIRECTIONUP = 2 ;When direction is up
Const DIRECTIONRIGHT = 3 ;When direction is right
Const DIRECTIONDOWN = 4 ;When direction is down
If KeyDown(LEFTKEY)
player\x = player\x -
MOVEX ;Move him left
player\direction =
DIRECTIONLEFT ;face him left
player\frame =
(player\frame + 1 )Mod (2) + (2 * (player\direction)-2) ;find frame