|
-
Jumping Platforms
I got this code from KoolExchange and I need som help. The ball jumps but i can't make it land on the platform above it.
http://www.freewebs.com/stealth_guild/jumptest.swf
Here is the code for the ball:
onClipEvent (enterFrame) {
if (Key.isDown(Key.RIGHT)) {
this._x += 5;
} else if (Key.isDown(Key.LEFT)) {
this._x -= 5;
}
if (Key.isDown(Key.UP)) {
JUMPing = true;
}
if (JUMPing) {
this._y -= JUMP;
JUMP -= .5;
if (JUMP<5) {
if (JUMP<-10) {
JUMP = -10;
}
}
if (_root.platform.hitTest(this._x, this._y, true)) {
JUMP = 12;
JUMPing = false
if (_root.platform.hitTest(this._x, this._y, true)) {
JUMP = 12;
JUMPing = false
}
}
}
}
Last edited by bailyesboy; 11-01-2006 at 09:42 AM.
Reason: Link
-
It would be helpful if you posted a .fun file.
-
Banned
i posted that tutoral all you haft to do is edit the platform movie clip and make to bars 1 and then one on top of that 1 and that should work if you still need help ill send you a fun file
-
I got the FUN file from www.koolexchange.com It's the Jumping one.
-
Banned
 Originally Posted by bailyesboy
yes i know i posted it there as i said open up km put that code into a ball mc or char mc then make 1 more mc name it platform open up the platform mc and draw to vector squares or any shape and then play the movie then you should beable to jump from one to the other =)
If you still need help i will post a multiply platform fun file with falling script so if you fall off a platform you fall.
-
Banned
Now for my next game update creating multiple platforms and falling and pickups.
-
Banned
Its ready i sent it to kool exchange for you multiple platform + pick ups.
And also tell me if you find any bugs in the game ok so i can fix them.
-
Thanks very much Is there a way of when the ball hits an object it could take you on to the next lvl?
-
Polak Maly
u may try to check objects positions
-
Banned
add this code to a door or something like a door when the char(character hits the door he is taken to frame level2 but you need to name that frame level 2 heres the code :
onClipEvent (enterFrame){
if (this.hitTest( _root.char ) ){
_root.gotoAndStop ( "level2" );
}
-
Is it possible that when you get to 2 points, it takes you to level2 instead of having a door?
-
Banned
 Originally Posted by bailyesboy
Is it possible that when you get to 2 points, it takes you to level2 instead of having a door?
yes thats easy heres the code:
onClipEvent (enterFrame) {
if (_root.score == 2) {
_root.gotoandstop("level2");
}
}
-
On what object would I post that code?
-
I found it thanks. If you want to see my basic game:
http://www.freewebs.com/stealth_guild/game.htm
-
Banned
-
Thanks! It's my 1st ever game (and congrats on your 400th post)
-
Banned
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|