Good Evening Flash Gurus,
I am attempting to make a fighting game like Mortal Kombat. I am attempting to script the characters so that they are commanded via the keyboard. I have no problem with the onKeyDown part of the script (walking & blocking), but the onKeyUp portion of the script (punching, kicking & jumping) I can’t for the love of Raiden get the character to return to it’s original state.
What I’m looking for is to press a key (let’s say the “A” key) and when it’s released, it will tell the character MC to go to the “punch” frame, and then return to it’s original “stand” frame. I have tried a few different variations, and the results I’m getting are as follows:
-MC stays at “punch” frame and will not return.
-MC moves to fast to show the “punch” frame so it just stays on the “stand frame”
-MC confuses the “punch” frame with the “walk” frame
-No reaction at all, since the enterFrame function constantly keeps the MC on the “stand” frame
What do you suggest to do to get the “active state” (punching kicking etc) to stay up long enough and then switch back to the “non-active state”