I’m making a Mario game. Ok now that thats outta the way. I don’t know how to make him jump. I had gotten it to where when I pushed the button, the frame changed and he went up like he was jumping, but i can’t get the frame to change to where he’s falling back down and well, I can’t make him fall back down…also I’m haveing issues with the crouching and jumping buttons…I can’t get it to work while i’m not walking and have it crouch or jump in the direction he’s facing… here’s the coding I have.
this is all in a movieclip called “remote”
onClipEvent (enterFrame) {
mario = new Object();
Key.addListener(mario);
with (_root.mario) {
if (Key.isDown(Key.RIGHT)) {
_x += 7;
}
if (Key.isDown(Key.LEFT) && Key.isDown(Key.DOWN)) {
_x +=7;
}
if (Key.isDown(Key.LEFT)) {
_x -= 7;
}
if (Key.isDown(Key.RIGHT) && Key.isDown(Key.DOWN)) {
_x -= 7;
}
mario.onKeyDown = function() {
pose = “0”;
pose2 = “0”;
pose3 = “0”;
if (Key.isDown(Key.RIGHT)) {
pose = “1”;
pose2 = “8”;
pose3 = “6”;
gotoAndStop(3);
}
if (Key.isDown(Key.LEFT)) {
pose = “2”;
pose2 = “9”;
pose3 = “7”;
gotoAndStop(4);
}
if (Key.isDown(Key.DOWN)) {
gotoAndStop(pose2);
} else if (Key.isDown(Key.SHIFT)) {
gotoAndStop(pose3);
}
};
mario.onKeyUp = function() {
gotoAndStop(pose);
if (Key.isDown(Key.DOWN)) {
gotoAndStop(pose2);
} else if (Key.isDown(Key.SHIFT)) {
gotoAndStop(pose3);
}
};
}
}
any help would be appreciated. thanks