00:00
00:00
Upgrade Your Account!

Hey! To start this decade right, we believe Newgrounds should be ad-free for EVERYONE. For this to work, we need people who have the means to become paying supporters. For just $3 per month or $25 for the year, you can help this happen and get some nice perks!

For the month of January we have disabled ads on all E-M content. We need 183 people to reach our January goal of 3,000 active supporters. If we hit that, we'll continue with a new goal in February!

Please check out our Supporter Upgrade and consider coming aboard!

I've made a jumping engine for all.

43,470 Views | 367 Replies
New Topic Respond to this Topic

Response to I've made a jumping engine for all. 2005-02-11 21:30:34


hey everytime i make the guy and the blocks something happens. the guy dont fall. If you put him somewhere he stays there. if you press space it jumps. then it passed the blocks and just keeps on falling.. HELP

Response to I've made a jumping engine for all. 2005-02-11 22:50:13


GREAT CODE! I've manage moving platforms and all that other junk and have even managed to improve on the code in some tidbits for my own use. THX! Only one prob... how would I go about making slanted platforms? This code is simple, short and sweet. I love it!

Response to I've made a jumping engine for all. 2005-02-12 12:39:54


thanks for that awesome code! i got it from gamecubicle's tut, and i'd like to thank you since ur the creator of it...

ne ways, COULD u post the code for a slanted platform? one where when you stand on it, ur player's mc gets slanted and angled to the platform? thanks!

PS-not a platform that provides as a slide, one you can stand still on, thanks!! oh and also, could u make it so that the platform does let you slide down it, if the platform is over a 45 degree angle, but not under?


the events are merely fictional, written, directed, and acted out by all who create them

BBS Signature

Response to I've made a jumping engine for all. 2005-02-12 15:38:54


I have one problem, again, it is that under the first if statement, the one that says what happens when you land on the top of the platform, when i say to go to my standing frame of my stick guy, when u hit the platform, when u land, you start jiggling, and it stays on the jump frame of my character...i made a ball version too, not with poses, but with colors...and it works...i think it has to do with the change in shape of the character, but there has to be someway to make it so when you land, you change frames of ur character...thanks for the help, if you leave some...


the events are merely fictional, written, directed, and acted out by all who create them

BBS Signature

Response to I've made a jumping engine for all. 2005-02-13 00:40:34


Crap, how am i supposed to fix this for actionscript 2.0?

Response to I've made a jumping engine for all. 2005-02-19 23:42:23


hey guys id love to make a game but i am a complete idiot in the sense of i cant do action script and i dont understand how to make guys shoot and kick and fight and stuff any help plese?

I've made a jumping engine for all.

Response to I've made a jumping engine for all. 2005-02-19 23:54:55


lol...ur a complete n00b but dont worry cause weve all passed through there.....being n00bs.....ill teach u just add me to ur MSN st slipknot_freak_11@hotmail.com

Response to I've made a jumping engine for all. 2005-02-20 00:27:52


thanx i will soon just gotta do some things first

Response to I've made a jumping engine for all. 2005-02-20 00:33:38


kk.....u wanna learn...i am willing to help u ....just add me

Response to I've made a jumping engine for all. 2005-02-23 03:36:26


Man, I just had to post in this thread... You can't let a great thread like this one die... even if the script is in Gamecubicle's Ultimate Tutorial.

KEEP POSTING IN HERE. I DONT WANT THIS THREAD TO DIE AGAIN.

YOU HEAR ME???

Response to I've made a jumping engine for all. 2005-02-23 12:30:32


Could you send me the fla please :) Im a bit of a newbie here so I'd be very greatful. (Btw, i dont say n00b cos it sounds to much like nob) lol Me addy is: dangalyassgrape@hotmail.com

Response to I've made a jumping engine for all. 2005-02-23 13:03:54


Rystic-

Just tried your code, worked great for me!
I just made a rectangle (longer veritcally)
and 2 others (longer horizontally)
and put the code for the player into the first rectangle
and then the block code into my 2 others and it worked fine.
I did try and move the registration point to the bottom of the player and it messes up when it lands so dont do that make sure its centerd =P

Also, I just skimmed through the code but what would you adjust if you wanted him to jump higher/shorter and faster/slower?


- Sig provided by ME of the NGSM

- If you try to stay high, your bound to stay low. -

- If I make you a sig, please credit me here -

BBS Signature

Response to I've made a jumping engine for all. 2005-02-23 14:24:50


Ah, everytime I make a game with jumping it is different for me, so I prefer to use my own code.

Response to I've made a jumping engine for all. 2005-02-25 04:29:37


still havent helped me yet im still waiting

I've made a jumping engine for all.

Response to I've made a jumping engine for all. 2005-02-25 06:21:32


This is the shit... I will use it in my class.

Response to I've made a jumping engine for all. 2005-03-01 23:28:31


Ok im having problems with mine because when i start the game the character falss, like he just jumped, i dont want him to do that, i only want him to jump when you hit spacebar, like when it starts he just keeps falling...

Response to I've made a jumping engine for all. 2005-03-02 08:26:56


Everything works ok apart from one thing.. he wont jump when hes running left or right, only when hes standing still.. like.. if hes touching the bars which make the x axis move he wont jump..

Response to I've made a jumping engine for all. 2005-03-02 17:35:43


Ive tried and tried to make this work, but all it does is make my character fall off the screen, the game im trying to make isnt a side scroller, wait...well it is but its not the truditional style, its a side scroller on the angle...and this jumping thing isnt working...but i still want the character to stay inside the screen.
so if you get my idea PLEASE, PLLLLEEAAASEE HELP!

Response to I've made a jumping engine for all. 2005-03-03 23:06:56


I don't like this script, doesnt work, I made bricks thicker but still huge problems...mabye because I have MX 2004 (7.2) <The best (er)

Response to I've made a jumping engine for all. 2005-03-03 23:19:57


At 2/11/05 10:50 PM, TakeOut wrote: GREAT CODE! I've manage moving platforms and all that other junk and have even managed to improve on the code in some tidbits for my own use. THX! Only one prob... how would I go about making slanted platforms? This code is simple, short and sweet. I love it!

thats easy, my game has it, but you'll have to apply this code to every slanted platform for it to work (which is the bad part about not making everything in one MC). Anyway just put that in any of the slanted blocks and it should work, the only thing you need to do is to have the center of your character by his feet, if its in the center then put _root.character._y+25 or how ever far the crosshair is from the feet)

onClipEvent(enterFrame){
if(this.hitTest(_root.character._x, _root.character._y, true)){
_root.character._y-=8
}
}

Response to I've made a jumping engine for all. 2005-03-03 23:25:40


hey rystic you got that actionscript from the flash tuturial but anywase good idea of posting it here. me too i get the same errors when i jump from all the way on top of the stage of a platform and land on a platform all the way down the screen i go right through it. i set my max fall to -20 and it goes right through still the only ways is to make the plaforme huge so you dont go right through.

Response to I've made a jumping engine for all. 2005-03-03 23:26:32


At 2/12/05 03:38 PM, Starogre wrote: I have one problem, again, it is that under the first if statement, the one that says what happens when you land on the top of the platform, when i say to go to my standing frame of my stick guy, when u hit the platform, when u land, you start jiggling, and it stays on the jump frame of my character...i made a ball version too, not with poses, but with colors...and it works...i think it has to do with the change in shape of the character, but there has to be someway to make it so when you land, you change frames of ur character...thanks for the help, if you leave some...

god damn its that much of a pain in the ass just use my engine, sorry to sound like an asshole there but come on, its simple and there is no shit like that happening, if you dont want to then its fine. BTW, for the 45 degree angle thing
just take the code I posted for the slant and put it after "if(......_y, true) put it here )"
"and !this._rotation<-45"

Response to I've made a jumping engine for all. 2005-03-03 23:28:12


sorry, I mean
"and this._rotation<=-45"

Response to I've made a jumping engine for all. 2005-03-06 18:40:09


At 3/3/05 11:25 PM, pcchipbrain wrote: hey rystic you got that actionscript from the flash tuturial but anywase good idea of posting it here. me too i get the same errors when i jump from all the way on top of the stage of a platform and land on a platform all the way down the screen i go right through it. i set my max fall to -20 and it goes right through still the only ways is to make the plaforme huge so you dont go right through.

The platform's size shouldn't be an issue when dealing with landing. E-mail me the flash file, and I'll see what I can do to fix it.

Response to I've made a jumping engine for all. 2005-03-06 18:41:45


At 2/12/05 03:38 PM, Starogre wrote: I have one problem, again, it is that under the first if statement, the one that says what happens when you land on the top of the platform, when i say to go to my standing frame of my stick guy, when u hit the platform, when u land, you start jiggling, and it stays on the jump frame of my character...i made a ball version too, not with poses, but with colors...and it works...i think it has to do with the change in shape of the character, but there has to be someway to make it so when you land, you change frames of ur character...thanks for the help, if you leave some...

When that happens, go into the character clip and try moving it closer to the center of the movieclip (the '+' sign). Toy with that until the jiggling stops.

Response to I've made a jumping engine for all. 2005-03-06 18:44:38


At 3/3/05 11:26 PM, The_Mercenary wrote:
god damn its that much of a pain in the ass just use my engine, sorry to sound like an asshole there but come on, its simple and there is no shit like that happening, if you dont want to then its fine. BTW, for the 45 degree angle thing
just take the code I posted for the slant and put it after "if(......_y, true) put it here )"
"and !this._rotation<-45"

Geez, Mercenary. It's not that big a problem. All you have to do is center the clip.

Response to I've made a jumping engine for all. 2005-03-06 18:49:53


At 3/3/05 11:25 PM, pcchipbrain wrote: hey rystic you got that actionscript from the flash tuturial but anywase good idea of posting it here.

WHAT?! . I didn't take this code from anywhere! I wrote it line for line. I even have the original files to prove it.

TELL ME WHERE YOU THINK I STOLE IT FROM. I'LL PROVE YOU WRONG.

I'm no thief.

Response to I've made a jumping engine for all. 2005-04-13 23:38:53


could some1 help me? when my guy animates he falls half way through the flatform :(

Response to I've made a jumping engine for all. 2005-04-14 00:58:37


At 3/6/05 06:44 PM, Rystic wrote:
At 3/3/05 11:26 PM, The_Mercenary wrote:
god damn its that much of a pain in the ass just use my engine, sorry to sound like an asshole there but come on, its simple and there is no shit like that happening, if you dont want to then its fine. BTW, for the 45 degree angle thing
just take the code I posted for the slant and put it after "if(......_y, true) put it here )"
"and !this._rotation<-45"
Geez, Mercenary. It's not that big a problem. All you have to do is center the clip.

Yea I know, sorry dude, I was getting carried away there. Now I'll actually post the script to my platform engine here.

Make a bunch of platforms, and make all of them into one big movieclip and give it the instance of "ground" and then put this code in it:
onClipEvent (load) {
_root.falltime = 0;
groundspeed = 10;
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.SPACE) && !jumping) {
vel_y = 38;
jumping = true;
_root.character.gotoAndStop("jumpframe#");
}
if (jumping == true) {
vel_y -= 2;
if (vel_y<=-15) {
vel_y = -15;
}
if (vel_y<15) {
_root.character.gotoAndStop("fallingframe#");
_root.falltime2++;
}
this._y += vel_y;
}
if (this.hitTest(_root.character._x, _root.character._y+18, true)) {
vel_y = 0;
_root.character.gotoAndStop(1);
_root.falling = false;
_root.falltime = 0;
jumping = false;
} else {
this._y -= 20;
_root.falltime++;
if (jumping == false and _root.falltime>=5) {
_root.character.gotoAndStop(3);
_root.falling = true;
}
}
}
onClipEvent (enterFrame) {
if (_root.scrollleft == true and _root.stopscroll == false) {
this._x -= groundspeed;
} else if (_root.scrollright == true and _root.stopscroll2 == false) {
this._x += groundspeed;
}
if (this.hitTest(_root.character._x, _root.character._y, true)) {
_root.ground._y += 5;
}
}

then make a character and give it the instance of "character" and put this code in it:

onClipEvent (load) {
speed2 = 8;
_root.scrollright = false;
_root.scrollleft = false;
_root.stopscroll2 = false;
_root.stopscroll = false;
boundry = _x=100;
boundry2 = _x=325;
}
onClipEvent (enterFrame) {
if (_root.ground.hitTest(this._x+30, this._y-25, true)) {
_root.stopscroll = true;
} else {
_root.stopscroll = false;
}
if (_root.ground.hitTest(this._x-30, this._y-25, true)) {
_root.stopscroll2 = true;
} else {
_root.stopscroll2 = false;
}
if (Key.isDown(Key.RIGHT) && !_root.ground.hitTest(this._x+15, this._y-25, true)) {
_xscale = 100;
if (this._x<boundry2) {
this._x += speed2;
} else {
_root.scrollleft = true;
}
} else if (Key.isDown(Key.LEFT) && !_root.ground.hitTest(this._x-15, this._y-25, true)) {
_xscale = -100;
if (this._x>boundry) {
this._x -= speed2;
} else {
_root.scrollright = true;
}
}
}
onClipEvent (keyUp) {
if (Key.getCode() == Key.RIGHT) {
_root.scrollleft = false;
} else if (Key.getCode() == Key.LEFT) {
_root.scrollright = false;
}
}

There thats all, now you have a game. Just dont use this code and submit it as a game, make something cool out of it. And make your characters "+" be at where his feet are so that he lands on the platforms right.

This engine isnt exactly the most perfect for pixel perfect platforming, but this is more like a ready-to-go thing, this can be use for alot of types of games, any sidescroller basically. And Rystic, you can try to mod if you want.

Response to I've made a jumping engine for all. 2005-04-14 17:34:04


I'll play with the code when I have the time. Unfortunately, I've got an english essay due tommorow. :(