00:00
00:00
Newgrounds Background Image Theme

mikeymurder just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

I've made a jumping engine for all.

48,417 Views | 365 Replies
New Topic Respond to this Topic

Response to I've made a jumping engine for all. 2004-07-24 16:23:51


it now says i have six errors cause i inserted the frames where it said (insertframe) and when i do test movie it just shows my guy. it tells me the errors when check the sytax

Response to I've made a jumping engine for all. 2004-07-24 16:28:19


At 7/24/04 04:23 PM, liquid-fyre wrote: it now says i have six errors cause i inserted the frames where it said (insertframe) and when i do test movie it just shows my guy. it tells me the errors when check the sytax

PUT THIS IN THE BLOCK

onClipEvent (load) {
activated = false;
down = false;

}
onClipEvent (enterFrame) {
_root.report.text = Math.round(_root.circle.yMax)+" "+Math.round(yMin);
xmin = getBounds(_root).xMin;
xmax = getBounds(_root).xMax;
ymin = getBounds(_root).yMin;
ymax = getBounds(_root).yMax;
if (_root.circle.xMax>xMin && _root.circle.xMin<xMax && _root.circle.yMax<yMin) {
if (_root.circle.yMax-_root.circle.jump*2>yMin) {
_root.circle._y = ymin-_root.circle._height/2;
_root.circle.jump = undefined;
_root.circle.fall = false;
activated = true;
}
}
if (Math.round(_root.circle.yMax)>Math.round(yMin)) {
if (hitTest(_root.circle) && _root.circle.xmax<xmin) {
_root.circle._x -= _root.circle.speed;
}
if (hitTest(_root.circle) && _root.circle.xmin>xmax) {
_root.circle._x += _root.circle.speed;
}
if (hitTest(_root.circle) && _root.circle.ymin>ymax && _root.circle.jump>-1) {
_root.circle.jump = -1*(_root.circle.jump);
}
}
if (activated == true && not hitTest(_root.circle) && _root.circle.jump == undefined) {
_root.circle.jump = 0;
activated = false;
}
if (hitTest(_root.circle) && _root.circle.ymax>ymin && _root.circle.jump<>undefined && _root.circle._y<_y) {
_root.circle._y = ymin-_root.circle._height/2;
_root.circle.jump = undefined;
_root.circle.fall = false;
activated = true;
}
if (_root.circle.ymax-_root.circle.jump>ymin && _root.circle.xMin<xMax && _root.circle.xMax>xMin && _root.circle.jump<>undefined && _root.circle._y<_y) {
_root.circle._y = ymin-_root.circle._height/2;
_root.circle.jump = undefined;
_root.circle.fall = false;
activated = true;
}
}

Response to I've made a jumping engine for all. 2004-07-24 16:32:02


ok do i just put that script in the same one as the other one? and where it says (enterframe) should i enter a frame?

Response to I've made a jumping engine for all. 2004-07-24 16:43:52


ok so i just restarted on everything and now it says i have one error

Response to I've made a jumping engine for all. 2004-07-24 16:55:33


Plz answer me

Response to I've made a jumping engine for all. 2004-07-24 16:59:08


ok so now i have no errors and when i test movie nothing happens lol

Response to I've made a jumping engine for all. 2004-07-24 17:02:42


At 7/24/04 04:59 PM, liquid-fyre wrote: ok so now i have no errors and when i test movie nothing happens lol

E-mail me the fla.

Response to I've made a jumping engine for all. 2004-07-24 17:07:25


Hey, is there a code to make the character turn around when you press the respective button? For example if you press the left arrow key that the character actually faces left and vice-versa? I sent you an e-mail earlier but I don't know if you got it.....


fucking magnets man how do they work

Response to I've made a jumping engine for all. 2004-07-24 17:11:33


ok i sent it

Response to I've made a jumping engine for all. 2004-07-24 17:13:52


sorry

Response to I've made a jumping engine for all. 2004-07-24 17:16:56


At 7/24/04 05:07 PM, -Mazza- wrote: Hey, is there a code to make the character turn around when you press the respective button? For example if you press the left arrow key that the character actually faces left and vice-versa? I sent you an e-mail earlier but I don't know if you got it.....

Put into the action for left ( Key.LEFT...) something like

if(_xscale==100){_xscale=-100;}

and for the right code

if(_xscale==-100){_xscale=100;}

Also you could make two frames inside the Hero MC, and use if(_currentframe==1) and so on.

Response to I've made a jumping engine for all. 2004-07-24 17:21:26


At 7/24/04 05:11 PM, liquid-fyre wrote: ok i sent it

It's not working for some reason. Just follow the instructions or post it online.

Remember, use movieclips in ONE FRAME.

Response to I've made a jumping engine for all. 2004-07-24 17:21:31


At 7/24/04 05:16 PM, schorhr wrote: Put into the action for left ( Key.LEFT...) something like

if(_xscale==100){_xscale=-100;}

and for the right code

if(_xscale==-100){_xscale=100;}

Also you could make two frames inside the Hero MC, and use if(_currentframe==1) and so on.

Thanks a lot!


fucking magnets man how do they work

Response to I've made a jumping engine for all. 2004-07-24 19:33:00


ok this actionscript doesnt work for me.. plz help me

Response to I've made a jumping engine for all. 2004-07-24 21:20:18


At 7/24/04 07:33 PM, liquid-fyre wrote: ok this actionscript doesnt work for me.. plz help me

You're gonna need to get MX, not MX 2004.

Response to I've made a jumping engine for all. 2004-07-24 22:08:03


At 7/24/04 09:20 PM, Rystic wrote:
At 7/24/04 07:33 PM, liquid-fyre wrote: ok this actionscript doesnt work for me.. plz help me
You're gonna need to get MX, not MX 2004.

MX 2004 works, he's just a dumbass.

Response to I've made a jumping engine for all. 2004-07-24 23:06:06


this script is to complex for me(even though i am a noob at it anyway). but how would i go about making the backround and platforms move and not the guy, like in a real platform game. I can see you are swamped with questions right now but if you ever get around to this one i would appreciat it. great script by the way.


BBS Signature

Response to I've made a jumping engine for all. 2004-07-24 23:18:51


nevermind i got it.


BBS Signature

Response to I've made a jumping engine for all. 2004-07-25 02:07:10


umm me and the guy talked of msn and we still couldn't get it to work

Response to I've made a jumping engine for all. 2004-07-25 02:14:10


At 7/24/04 03:06 PM, Rystic wrote: stuff

AAAAHHH!!!! in 2 minutes i made a platform game! i've spent the last couple months trying to get the code right.

I don't know if i hate you or love you.

Hm... i hove you.


I used to be relevant.

Response to I've made a jumping engine for all. 2004-07-25 09:08:37


At 7/24/04 10:08 PM, SniperWolf1942 wrote:
At 7/24/04 09:20 PM, Rystic wrote:
At 7/24/04 07:33 PM, liquid-fyre wrote: ok this actionscript doesnt work for me.. plz help me
You're gonna need to get MX, not MX 2004.
MX 2004 works, he's just a dumbass.

Can someone with MX 2004 help him, please? I tried, but I have MX and we can't share files.

Response to I've made a jumping engine for all. 2004-07-25 09:09:40


At 7/25/04 02:14 AM, scottmale24 wrote:
At 7/24/04 03:06 PM, Rystic wrote: stuff
AAAAHHH!!!! in 2 minutes i made a platform game! i've spent the last couple months trying to get the code right.

I don't know if i hate you or love you.

Hm... i hove you.

Nice. I'm glad your enjoying my script.

Response to I've made a jumping engine for all. 2004-07-25 09:12:21


At 7/24/04 11:18 PM, 23450 wrote: nevermind i got it.

Excellent. Wasn't that easy to use?

Response to I've made a jumping engine for all. 2004-07-25 09:32:15


Nice Job
You have some serious potential

Response to I've made a jumping engine for all. 2004-07-25 09:56:24


At 7/25/04 09:32 AM, mcintyrej wrote: Nice Job
You have some serious potential

.... some potential ...?

Response to I've made a jumping engine for all. 2004-07-25 10:41:20


At 7/23/04 10:31 PM, Rystic wrote: I've just made a new jumping engine...

Dude you are seriously going in my credits. The code works perfectly (I had to center the "<circle>" MC) apart from when he lands on any other that the first block he just kinda bounces down a bit but then back up, but thats ok. I cant really thank you enough for this code. Dude.

Response to I've made a jumping engine for all. 2004-07-25 11:01:16


At 7/25/04 10:41 AM, FFKing wrote:
At 7/23/04 10:31 PM, Rystic wrote: I've just made a new jumping engine...
Dude you are seriously going in my credits. The code works perfectly (I had to center the "<circle>" MC) apart from when he lands on any other that the first block he just kinda bounces down a bit but then back up, but thats ok. I cant really thank you enough for this code. Dude.

No problem, man. If it bounces down a bit, try getting it closer to the center inside the clip.

Thanks for putting me in the credits! I encourage anyone else who uses this engine to do the same and post a link to this topic, so others can use it as well!

Response to I've made a jumping engine for all. 2004-07-25 11:04:45


If anyone makes a game using this engine, could you post a link to it here? I wanna see any games that use it.

Sorry, this is one of those "testing it into the ground" things. I wanna make sure it works for everyone else as well.

Response to I've made a jumping engine for all. 2004-07-25 11:12:23


I got a real simple one thats simply a ball bouncing so far, but that sux as its sooooooooo simple, but what I will do is do a demo of a level in my upcoming game (Saddam adventures 1.04) and email u the link.

Response to I've made a jumping engine for all. 2004-07-25 11:36:45


At 7/25/04 11:12 AM, FFKing wrote: I got a real simple one thats simply a ball bouncing so far, but that sux as its sooooooooo simple, but what I will do is do a demo of a level in my upcoming game (Saddam adventures 1.04) and email u the link.

Thanks. And don't worry about there being a simple bouncing ball; that's pretty much what the engine's FLA looks like.