im making a mario game and i need some help.
ive got an mc with mario standing, running right, running left, jumping and when he dies.
how can i make it so when he jumps the running speed carrys on so he moves across when jumping? Game Over - Super Mario Wiki:: The Game Over screen for Yoshis Island: Super Mario Advance 3. Apparently, a Game Over in the Mario series is the equivalent of death, as http://www.mariowiki.com/Game_OverHOME |
heres the code:
onClipEvent(enterFrame){
if(key.isDown(key.RIGHT)){
gotoAndPlay(2)
_x+= 5;
}
if(key.isDown(key.LEFT)){
gotoAndPlay(21)
_x-= 5;
}
if(key.isDown(key.UP)){
gotoAndPlay(6)
}
if(key.isDown(key.DOWN)){
gotoAndPlay(5)
}
if((this._x > 100)&&(key.isDown(key.RIGHT))){
_root.bg._x -= 5
}
if(this.hitTest(_root.border)){
this._x -= 5
}
}
I don't think i have an answer to your question ('cause i'm a newbie), but personally i would do the jumping movement all with an actionscript.
I have a question: in a platform game like metal slug or mario bros, how can i do the sliding scenary? shall i use a very long image?
maybe this works?
onClipEvent(enterFrame){
if(key.isDown(key.RIGHT)){
gotoAndPlay(2)
_x+= 5;
runs = "right";
} else {
runs = ""; MARIO GAMES - PLAY ONLINE SUPER MARIO BROS GAMES:: MARIO BROS GAMES, INCLUDING PAPER MARIO GAMES, MARIO REMIX, MARIO FLASH GAMES. Your mission in this Mario platform action game is to complete each http://www.pcgame4fun.com/mario-games-2.htmlHOME |
}
if(key.isDown(key.LEFT)){
gotoAndPlay(21)
_x-= 5;
runs = "left";
} else {
runs = "";
}
if(key.isDown(key.UP)){
gotoAndPlay(6)
if (runs == "right") {
_x+= 5;
} else if (runs == "left") {
_x-= 5;
}
}
if(key.isDown(key.DOWN)){
gotoAndPlay(5)
}
}
and please use the AS tags when posting code.
i dunno id think that the code that kalliban gave would work
thats what i do.
nah dont work
If you wanna get real nice effects, make a couple of over-lapping layers of long images, that move at slightly different speeds. You'll get the effect that the background images are further away. Use this carefully since you can end up with choppy movement, if you over-do it, stick with only 2, or 3 layers...
Nortel Unveils Vision, Strategy for Israeli High-Performance Net
Busy Friday Leads to Strong Close for Net Stocks |