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

(29,590 views • 373 replies)

This topic is 13 pages long. [ 135 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 ]

<< < > >>
None

Rystic

Reply To Post Reply & Quote

Posted at: 7/22/06 11:49 PM

Rystic LIGHT LEVEL 50

Sign-Up: 03/09/02

Posts: 956

Does anyone know if my engine works with flash 8?


Angry

yoshlan0440

Reply To Post Reply & Quote

Posted at: 7/31/06 09:23 PM

yoshlan0440 EVIL LEVEL 04

Sign-Up: 07/17/06

Posts: 2

no it's not rellay working for me and i'm using flash 8 pro and the cracater i had was half why trough the the rectangle stragely very stragely


None

Dog

Reply To Post Reply & Quote

Posted at: 7/31/06 10:34 PM

Dog NEUTRAL LEVEL 10

Sign-Up: 02/08/05

Posts: 763

I have flash 8 Pro, and this awesome script doesn't work. =(

The character MC falls half way into the block, and he can't jump.

Gimme a sec and i'll post an example.


None

Trunks

Reply To Post Reply & Quote

Posted at: 7/31/06 10:37 PM

Trunks DARK LEVEL 22

Sign-Up: 07/31/05

Posts: 4,167

Read my fix a couple pages back (when you change the jumpspeed and maxfall, etc) for your framerate (I can bet you guys are using 12 fps) and then try it. I would imagine it would work, but I'm not sure.

Hope that works... and why did you bump this thread again instead of PMing Rystic?

'05 users for the win :3

BBS Signature

None

Dog

Reply To Post Reply & Quote

Posted at: 7/31/06 10:42 PM

Dog NEUTRAL LEVEL 10

Sign-Up: 02/08/05

Posts: 763

At 7/31/06 10:37 PM, LordTrunks wrote: Read my fix a couple pages back (when you change the jumpspeed and maxfall, etc) for your framerate (I can bet you guys are using 12 fps) and then try it. I would imagine it would work, but I'm not sure.

Hope that works... and why did you bump this thread again instead of PMing Rystic?

Oh yea....


None

klaymanvince1

Reply To Post Reply & Quote

Posted at: 8/8/06 03:06 PM

klaymanvince1 NEUTRAL LEVEL 02

Sign-Up: 08/08/06

Posts: 20

i made the game and everything works except when i make walls that u dont walk on like so u cant go past it if u jump into it but anyways the walls dont work i just go right through it and i do have flash pro 8 can somebody who has fash 8 help?


None

West-End-Pro

Reply To Post Reply & Quote

Posted at: 8/8/06 03:22 PM

West-End-Pro NEUTRAL LEVEL 23

Sign-Up: 02/15/06

Posts: 2,398

I have found that sometimes it works, and sometimes it doesn't work.


None

Calintz

Reply To Post Reply & Quote

Posted at: 9/9/06 11:48 AM

Calintz FAB LEVEL 20

Sign-Up: 12/15/03

Posts: 5,721

I can honestlly say, I love you

¥¥¥¥ / Anonymous / Calintz


None

gotoAndPlay

Reply To Post Reply & Quote

Posted at: 9/9/06 11:52 AM

gotoAndPlay EVIL LEVEL 07

Sign-Up: 04/24/05

Posts: 235

hell ya man!


None

Calintz

Reply To Post Reply & Quote

Posted at: 9/9/06 11:54 AM

Calintz FAB LEVEL 20

Sign-Up: 12/15/03

Posts: 5,721

At 9/9/06 11:52 AM, mr_resident_evil wrote: hell ya man!

HA. Honestlly, it's such a good code. Although, it restricts you.. You must still know about AS to add enimies, power ups, health, etc.. so don't just make some lame game.

¥¥¥¥ / Anonymous / Calintz


None

gotoAndPlay

Reply To Post Reply & Quote

Posted at: 9/9/06 12:07 PM

gotoAndPlay EVIL LEVEL 07

Sign-Up: 04/24/05

Posts: 235

At 9/9/06 11:52 AM, mr_resident_evil wrote: hell ya man!

actually the MC that represents the character keeps falling threw the ground thing.


None

GumSlough

Reply To Post Reply & Quote

Posted at: 9/24/06 12:23 PM

GumSlough EVIL LEVEL 04

Sign-Up: 03/23/06

Posts: 107

I think its an awsome code but I don't like that the Character can jump so far left and right, when in the air. I want to restrict him to only jumping a certain distance left and right can anyone help me with this problem?

This is the demo of my game:

http://media.putfile..m/unfinished-game-21

This is the code I have so far:

onClipEvent (load) {
fall = false;
_name = "circle";
jump = 0;
speed = 20;
jumpheight = 15;
maxfall = -54;
}
onClipEvent (enterFrame) {
xmin = getBounds(_root).xMin;
xmax = getBounds(_root).xMax;
ymin = getBounds(_root).yMin;
ymax = getBounds(_root).yMax;
if (Key.isDown(Key.SPACE) && fall == false && jump == undefined) {
fall = true;
jump = jumpheight;
}
if (jump<>undefined) {
if (jump>maxfall) {
jump--;
}
_y -= jump;
}
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.LEFT)) {
_x -= speed;
}
if (Key.isDown(Key.RIGHT)) {
_x += speed;
}
}


None

GumSlough

Reply To Post Reply & Quote

Posted at: 9/25/06 03:43 PM

GumSlough EVIL LEVEL 04

Sign-Up: 03/23/06

Posts: 107

nvm


Questioning

Gorilla-Studios

Reply To Post Reply & Quote

Posted at: 9/25/06 03:47 PM

Gorilla-Studios FAB LEVEL 26

Sign-Up: 11/18/05

Posts: 1,700

Woah, isnt this topic over two years old?

Gorilla Studios || A game is like sex, its better when its free

BBS Signature

None

pivot11

Reply To Post Reply & Quote

Posted at: 9/25/06 05:20 PM

pivot11 FAB LEVEL 07

Sign-Up: 06/16/06

Posts: 1,124

nice codes.....how did you make it so you dont need instances?

oh, and watch out....there gonna be a butt load of nOObs making platformers
alot of blamin'

Blok' Party, Orbital Khaos, site, MSMstudios, Phrozen Phlame

BBS Signature

None

pivot11

Reply To Post Reply & Quote

Posted at: 9/25/06 05:22 PM

pivot11 FAB LEVEL 07

Sign-Up: 06/16/06

Posts: 1,124

At 7/31/06 09:23 PM, yoshlan0440 wrote: no it's not rellay working for me and i'm using flash 8 pro and the cracater i had was half why trough the the rectangle stragely very stragely

srry for double posting but, its doing this cuz the registration is in the middle

Blok' Party, Orbital Khaos, site, MSMstudios, Phrozen Phlame

BBS Signature

None

fitskies1

Reply To Post Reply & Quote

Posted at: 10/4/06 12:11 AM

fitskies1 LIGHT LEVEL 10

Sign-Up: 09/15/06

Posts: 130

ok if the characters falling through the block this might work for you.
put this in the character

onClipEvent (load) {
fall = false;
_name = "circle";
jump = 0;
speed = 8;
jumpheight = 18;
maxfall = -54;
}
onClipEvent (enterFrame) {
xmin = getBounds(_root).xMin;
xmax = getBounds(_root).xMax;
ymin = getBounds(_root).yMin;
ymax = getBounds(_root).yMax;
if (Key.isDown(Key.SPACE) && fall == false && jump == undefined) {
fall = true;
jump = jumpheight;
}
if (jump<>undefined) {
if (jump>maxfall) {
jump--;
}
_y -= jump;
}
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.LEFT)) {
_x -= speed;
}
if (Key.isDown(Key.RIGHT)) {
_x += speed;
}
}

and then 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>yMi
n) {
_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;
}
}

if this dont work i have no idea

Best Movie EVER!-Dungeons or dragons-Best Movie EVER!

BBS Signature

None

Goldtop

Reply To Post Reply & Quote

Posted at: 10/7/06 03:33 PM

Goldtop LIGHT LEVEL 07

Sign-Up: 09/24/06

Posts: 20

i used tis i think a year ago when messing around. now im making a 2p fighting game and want to include this. is there anyway to get it to accept two movie clips? i tried messing around with it, and it failed most miserably


None

Goldtop

Reply To Post Reply & Quote

Posted at: 10/7/06 06:14 PM

Goldtop LIGHT LEVEL 07

Sign-Up: 09/24/06

Posts: 20

At 10/7/06 03:33 PM, Goldtop wrote: is there anyway to get it to accept two movie clips?

nevermind, ive got it. btw, for anyone else with this problem, i found several ways to do it, but the easiest by far is to copy the block, and paste it in its shadow (right click>paste in place) then go to its script, and replace all of the "circle"s or whatever you had, i had player1, with the instance name of your second player. the easiest way to do this is ctrl+f, type in "circle" in the "find" box and "player2"(or whatever the nstance name of your second guy is) and clikc replace all.


None

Cryzabey

Reply To Post Reply & Quote

Posted at: 10/7/06 06:35 PM

Cryzabey LIGHT LEVEL 11

Sign-Up: 06/27/06

Posts: 686

I got it to work in Flash 8 perfectly, and I applaud your brilliant code. I'm gunna spend the rest of the day making it works with one big block and can have slopes and hills :D.

BBS Signature

None

ShortMonkey

Reply To Post Reply & Quote

Posted at: 10/21/06 02:17 AM

ShortMonkey DARK LEVEL 30

Sign-Up: 04/01/06

Posts: 7,221

Hey, where is the place where I can edit to make it fall faster or lower? and tell me which movie clip to put it in please. Thanks.


None

Hornby

Reply To Post Reply & Quote

Posted at: 10/21/06 02:34 AM

Hornby DARK LEVEL 21

Sign-Up: 06/22/06

Posts: 4,396

When I jump off a block and then land back on it I fall right off. If I jump off it and land on another block. No problem. If I jump of that block and land back on the first block no problem. But if I jump and land on the same block I fall right through it


None

groovyguy

Reply To Post Reply & Quote

Posted at: 10/29/06 10:36 PM

groovyguy NEUTRAL LEVEL 03

Sign-Up: 10/19/05

Posts: 3

i'm having a really big problem. everytime i jump onto a different black, my character falls right through it. please help!


None

Miseryscompany06

Reply To Post Reply & Quote

Posted at: 1/26/07 05:25 PM

Miseryscompany06 LIGHT LEVEL 10

Sign-Up: 12/11/06

Posts: 15

Yeah, it's doing the same thing for me, it lands fine originally, but if i try to jump or anything, it goes right through everything.

Haha, but I don't know if anyone checks this post anymore.


Questioning

blackqat

Reply To Post Reply & Quote

Posted at: 2/17/07 10:13 PM

blackqat EVIL LEVEL 13

Sign-Up: 12/17/06

Posts: 847

I use Flash Pro 8 and This is almost working, but the character goes halfway through the block and the stops.

PROUD '06 USER


None

Greth-of-choas

Reply To Post Reply & Quote

Posted at: 2/20/07 07:32 PM

Greth-of-choas EVIL LEVEL 15

Sign-Up: 08/28/06

Posts: 1,334

It worked but I was wondering how would you make the screen scroll?

There is Heaven
There is Hell
And then there is Heck

BBS Signature

Questioning

sugarcrazedbaboon

Reply To Post Reply & Quote

Posted at: 2/25/07 03:42 PM

sugarcrazedbaboon EVIL LEVEL 03

Sign-Up: 01/03/07

Posts: 42

yeah, I have always wanted it to scroll.


None

GustTheASGuy

Reply To Post Reply & Quote

Posted at: 2/25/07 03:50 PM

GustTheASGuy LIGHT LEVEL 08

Sign-Up: 11/02/05

Posts: 11,372

Lawl this thread is magical. Is it because the code is so long? :P

#ngprogramming at irc.freenode.net
haXe | Keel imperative | Spyro! | Thru you


None

blackqat

Reply To Post Reply & Quote

Posted at: 3/15/07 10:50 PM

blackqat EVIL LEVEL 13

Sign-Up: 12/17/06

Posts: 847

At 2/20/07 07:32 PM, Greth-of-choas wrote: It worked but I was wondering how would you make the screen scroll?

just make whatever you want to scroll into an mc, give it an instance of thing put a stop action in the first frame, and make an animation of it scrolling. Then put this tiny bit of code into the circle mc:

onClipEvent(enterFrame){
if(Key.isDown(Key.RIGHT)){
_root.thing.play();
}
if(!Key.isDown(Key.RIGHT)){
_root.thing.stop();
}
}

It will only scroll right though and it may make it completely not work, but probably not.

PROUD '06 USER


None

Zodiak7

Reply To Post Reply & Quote

Posted at: 3/21/07 05:03 PM

Zodiak7 EVIL LEVEL 13

Sign-Up: 11/16/06

Posts: 1,529

At 2/17/07 10:13 PM, blackqat wrote: I use Flash Pro 8 and This is almost working, but the character goes halfway through the block and the stops.

I have the same problem with the original code, when I use the one posted later on it falls out of the screen entirely.
:(


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

<< Back

This topic is 13 pages long. [ 135 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 ]

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