Game maker change sprite based on direction. Read up on asset layers in the manual to see what they are.