Forum Topic: I've made a jumping engine for all.

(29,513 views • 373 replies)

This topic is 13 pages long. [ 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 91113 ]

<< < > >>
None

liquid-fyre

Reply To Post Reply & Quote

Posted at: 7/24/04 04:15 PM

liquid-fyre NEUTRAL LEVEL 01

Sign-Up: 06/28/04

Posts: 89

ok i do that and it says there is ten errors


None

schorhr

Reply To Post Reply & Quote

Posted at: 7/24/04 04:19 PM

schorhr NEUTRAL LEVEL 11

Sign-Up: 05/28/02

Posts: 9,029

Let me guess...

"OnClipEvent.... can only be used in movieclips" or something?

You must click the movieclip, if you dont you will post it into a key frame.
See picture:

I've made a jumping engine for all.


None

liquid-fyre

Reply To Post Reply & Quote

Posted at: 7/24/04 04:23 PM

liquid-fyre NEUTRAL LEVEL 01

Sign-Up: 06/28/04

Posts: 89

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


None

Rystic

Reply To Post Reply & Quote

Posted at: 7/24/04 04:28 PM

Rystic LIGHT LEVEL 50

Sign-Up: 03/09/02

Posts: 956

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;
}
}


None

liquid-fyre

Reply To Post Reply & Quote

Posted at: 7/24/04 04:32 PM

liquid-fyre NEUTRAL LEVEL 01

Sign-Up: 06/28/04

Posts: 89

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?


None

liquid-fyre

Reply To Post Reply & Quote

Posted at: 7/24/04 04:43 PM

liquid-fyre NEUTRAL LEVEL 01

Sign-Up: 06/28/04

Posts: 89

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


Happy

liquid-fyre

Reply To Post Reply & Quote

Posted at: 7/24/04 04:55 PM

liquid-fyre NEUTRAL LEVEL 01

Sign-Up: 06/28/04

Posts: 89

Plz answer me


None

liquid-fyre

Reply To Post Reply & Quote

Posted at: 7/24/04 04:59 PM

liquid-fyre NEUTRAL LEVEL 01

Sign-Up: 06/28/04

Posts: 89

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


None

Rystic

Reply To Post Reply & Quote

Posted at: 7/24/04 05:02 PM

Rystic LIGHT LEVEL 50

Sign-Up: 03/09/02

Posts: 956

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.


None

Mazza

Reply To Post Reply & Quote

Posted at: 7/24/04 05:07 PM

Mazza LIGHT LEVEL 35

Sign-Up: 02/10/02

Posts: 5,875

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.....


None

liquid-fyre

Reply To Post Reply & Quote

Posted at: 7/24/04 05:11 PM

liquid-fyre NEUTRAL LEVEL 01

Sign-Up: 06/28/04

Posts: 89

ok i sent it


None

Taylor

Reply To Post Reply & Quote

Posted at: 7/24/04 05:12 PM

Taylor LIGHT LEVEL 09

Sign-Up: 08/19/03

Posts: 8,508

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

DO NOT, I REPEAT DO NOT EVER quadruple post...


None

liquid-fyre

Reply To Post Reply & Quote

Posted at: 7/24/04 05:13 PM

liquid-fyre NEUTRAL LEVEL 01

Sign-Up: 06/28/04

Posts: 89

sorry


None

schorhr

Reply To Post Reply & Quote

Posted at: 7/24/04 05:16 PM

schorhr NEUTRAL LEVEL 11

Sign-Up: 05/28/02

Posts: 9,029

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.


None

Rystic

Reply To Post Reply & Quote

Posted at: 7/24/04 05:21 PM

Rystic LIGHT LEVEL 50

Sign-Up: 03/09/02

Posts: 956

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.


None

Mazza

Reply To Post Reply & Quote

Posted at: 7/24/04 05:21 PM

Mazza LIGHT LEVEL 35

Sign-Up: 02/10/02

Posts: 5,875

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!


None

liquid-fyre

Reply To Post Reply & Quote

Posted at: 7/24/04 07:33 PM

liquid-fyre NEUTRAL LEVEL 01

Sign-Up: 06/28/04

Posts: 89

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


None

Rystic

Reply To Post Reply & Quote

Posted at: 7/24/04 09:20 PM

Rystic LIGHT LEVEL 50

Sign-Up: 03/09/02

Posts: 956

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.


None

ASSFAN

Reply To Post Reply & Quote

Posted at: 7/24/04 10:08 PM

ASSFAN EVIL LEVEL 13

Sign-Up: 03/24/02

Posts: 827

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.


None

23450

Reply To Post Reply & Quote

Posted at: 7/24/04 11:06 PM

23450 LIGHT LEVEL 27

Sign-Up: 05/28/03

Posts: 7,302

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.

Halo 3 GamerTag: XCornDawgX


None

23450

Reply To Post Reply & Quote

Posted at: 7/24/04 11:18 PM

23450 LIGHT LEVEL 27

Sign-Up: 05/28/03

Posts: 7,302

nevermind i got it.

Halo 3 GamerTag: XCornDawgX


None

liquid-fyre

Reply To Post Reply & Quote

Posted at: 7/25/04 02:07 AM

liquid-fyre NEUTRAL LEVEL 01

Sign-Up: 06/28/04

Posts: 89

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


None

scottmale24

Reply To Post Reply & Quote

Posted at: 7/25/04 02:14 AM

scottmale24 DARK LEVEL 20

Sign-Up: 08/13/01

Posts: 12,222

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.

Art thread // Epic Quest! // Webcomic
Sig art by Kosmikophobia

BBS Signature

None

Rystic

Reply To Post Reply & Quote

Posted at: 7/25/04 09:08 AM

Rystic LIGHT LEVEL 50

Sign-Up: 03/09/02

Posts: 956

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.


None

Rystic

Reply To Post Reply & Quote

Posted at: 7/25/04 09:09 AM

Rystic LIGHT LEVEL 50

Sign-Up: 03/09/02

Posts: 956

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.


Happy

Rystic

Reply To Post Reply & Quote

Posted at: 7/25/04 09:12 AM

Rystic LIGHT LEVEL 50

Sign-Up: 03/09/02

Posts: 956

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

Excellent. Wasn't that easy to use?


Happy

mcintyrej

Reply To Post Reply & Quote

Posted at: 7/25/04 09:32 AM

mcintyrej NEUTRAL LEVEL 05

Sign-Up: 01/02/04

Posts: 9

Nice Job
You have some serious potential


None

Rystic

Reply To Post Reply & Quote

Posted at: 7/25/04 09:56 AM

Rystic LIGHT LEVEL 50

Sign-Up: 03/09/02

Posts: 956

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

.... some potential ...?


None

FFKing

Reply To Post Reply & Quote

Posted at: 7/25/04 10:41 AM

FFKing EVIL LEVEL 06

Sign-Up: 12/13/03

Posts: 358

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.


None

Rystic

Reply To Post Reply & Quote

Posted at: 7/25/04 11:01 AM

Rystic LIGHT LEVEL 50

Sign-Up: 03/09/02

Posts: 956

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!


All times are Eastern Standard Time (GMT -5) | Current Time: 05:04 AM

<< Back

This topic is 13 pages long. [ 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 91113 ]

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!