A Flash Developer Resource Site

Results 1 to 17 of 17

Thread: Jumping Platforms

  1. #1
    Member
    Join Date
    Jan 2006
    Posts
    44

    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

  2. #2
    Junior Member
    Join Date
    Oct 2004
    Location
    Maine
    Posts
    4
    It would be helpful if you posted a .fun file.

  3. #3
    Banned XareoX's Avatar
    Join Date
    Aug 2006
    Posts
    462
    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

  4. #4
    Member
    Join Date
    Jan 2006
    Posts
    44
    I got the FUN file from www.koolexchange.com It's the Jumping one.

  5. #5
    Banned XareoX's Avatar
    Join Date
    Aug 2006
    Posts
    462
    Quote Originally Posted by bailyesboy
    I got the FUN file from www.koolexchange.com It's the Jumping one.
    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.

  6. #6
    Banned XareoX's Avatar
    Join Date
    Aug 2006
    Posts
    462
    Now for my next game update creating multiple platforms and falling and pickups.

  7. #7
    Banned XareoX's Avatar
    Join Date
    Aug 2006
    Posts
    462
    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.

  8. #8
    Member
    Join Date
    Jan 2006
    Posts
    44
    Thanks very much Is there a way of when the ball hits an object it could take you on to the next lvl?

  9. #9
    Polak Maly ant_Z's Avatar
    Join Date
    Jul 2006
    Location
    Poland
    Posts
    440
    u may try to check objects positions

  10. #10
    Banned XareoX's Avatar
    Join Date
    Aug 2006
    Posts
    462
    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" );
    }

  11. #11
    Member
    Join Date
    Jan 2006
    Posts
    44
    Is it possible that when you get to 2 points, it takes you to level2 instead of having a door?

  12. #12
    Banned XareoX's Avatar
    Join Date
    Aug 2006
    Posts
    462
    Quote 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");
    }
    }

  13. #13
    Member
    Join Date
    Jan 2006
    Posts
    44
    On what object would I post that code?

  14. #14
    Member
    Join Date
    Jan 2006
    Posts
    44
    I found it thanks. If you want to see my basic game:

    http://www.freewebs.com/stealth_guild/game.htm

  15. #15
    Banned XareoX's Avatar
    Join Date
    Aug 2006
    Posts
    462
    Nice game

  16. #16
    Member
    Join Date
    Jan 2006
    Posts
    44
    Thanks! It's my 1st ever game (and congrats on your 400th post)

  17. #17
    Banned XareoX's Avatar
    Join Date
    Aug 2006
    Posts
    462
    cool and thanks =)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center