I read the tutorials on how to create a stationary gun that rattles off ammo at a character (usually a ship) that is snapped to the mouse. But here's what I want to know how to do. Although I can create an image that is controlled by key presses, how do you create a character who walks and shoots in whatever direction he is facing (using the UP key to move him in the direction he is facing, the DOWN key to move him backwards, the LEFT and RIGHT keys to rotate the character, and the SPACE BAR to shoot in that direction).
In other words, I know how to rotate the character in any direction, but how do I make him walk and fire in that direction using only the UP key and SPACE BAR?
Any help would be much appreciated. Thanks.
