So, I can crouch, but when I try to jump without moving it doesnt but I can crouch and stand still. But when I move and press crouch I still crouch. How do I make it so I don't crouch when I move. Also when I move and press jump it jumps which is fine. Here is the code, It is in AS2:
if (Key.isDown(Key.DOWN)) { gravity = 0 gotoAndStop("crouch" }else if (speed == 0) { gotoAndStop("idle" }
Also, I am doing the code in frames. So it's like the first frame layer is named walk or jump, depending on what it is, the second layer of frames is the code and the last is the animation that I want.
Thanks for the help. I gave you everything I have.
Try pulling the code out of the frames and putting it on the characters movie clip. Use onClipEvent(load) for initiating variables and onClipEvent(enterFrame) for everything else. So instead of gotoAndStop, use this.gotoAndStop.
Once you do that, you will have a good starting point for debugging your game.