A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: Sir isaac's theory bugs meh!

  1. #1
    The next Squaresoft
    Join Date
    Sep 2004
    Location
    Zanarkand
    Posts
    215

    Sir isaac's theory bugs meh!

    HEY GUYS! what's up?

    i've been doing some here and there with gravity
    and this is the thing that bugs me...

    i cant get the guy to land PERFECTLY on a platform

    yes it lands and stops but it changes position
    (like it lands on top of the platform, then in the middle)

    how to fix this?

    ahm, here's the script i used:

    code:

    if (Key.isDown(Key.SPACE) && !jumping) {
    vel_y = 40;
    jumping = true;
    }
    if (jumping == true) {
    vel_y -= 6;
    if (vel_y <=-40) {
    vel_y = -40;
    }
    this._y -= vel_y;
    }
    if (this.hitTest(_root.ground)) {
    vel_y = 0;
    jumping = false;
    }
    if (this.hitTest(_root.ground) && !jumping) {
    fall += 1;
    if (fall>40) {
    fall = 40;
    }
    this._y += fall;
    }



    the ground there is the instance name of my platform

    yeah, can anyone help me out with this,

    THNX a BUNCH!
    "Are those gummy worms? Can I have some?"

    "Nevermind, I just saw one move by itself..."

  2. #2
    Junior Member
    Join Date
    Dec 2004
    Location
    uk
    Posts
    22
    This is probably a silly question but have you checked the registration points of your mc's?

  3. #3
    The next Squaresoft
    Join Date
    Sep 2004
    Location
    Zanarkand
    Posts
    215
    erhm, pardon me for my poor flash language

    but, Movie clip entry points?

    whats that?
    "Are those gummy worms? Can I have some?"

    "Nevermind, I just saw one move by itself..."

  4. #4
    Junior Member
    Join Date
    Dec 2004
    Location
    uk
    Posts
    22
    double click the mc that you want to edit. and then move the mc so that the crosshair is at the point where you want to calculate your positions from. typically this would be the top of the platform mc and the bottom of the "player"'s feet. on this file there are 2 mc's on the stage.

    symbol 1 - reg point on bottom.
    symbol 2 - reg point on top.
    Attached Files Attached Files

  5. #5
    The next Squaresoft
    Join Date
    Sep 2004
    Location
    Zanarkand
    Posts
    215
    I just tried it on my file

    and yeah, i see what you mean

    though just to get things off my chest,

    i have this file(credited from another person, its not mine!)

    and its like my basis for gravity

    but the problem is that it sometimes sticks to the upper platforms
    and it doesnt land ON them

    can it be fixed?

    anyhoo, thnx a bunch!
    Attached Files Attached Files
    "Are those gummy worms? Can I have some?"

    "Nevermind, I just saw one move by itself..."

  6. #6
    Junior Member
    Join Date
    Dec 2004
    Location
    uk
    Posts
    22
    hi, just had a quick look and i'm sure somthing can be done, i'll have a look sometime in the next day or so, sorry, but i've got lots on. I presume your problem is that the hero mc doesn't sit neatly on top of the platforms.

  7. #7
    The next Squaresoft
    Join Date
    Sep 2004
    Location
    Zanarkand
    Posts
    215
    ah no rush, hehe

    anyway, yeah, thats my problem...

    anyway thnx for the help!
    "Are those gummy worms? Can I have some?"

    "Nevermind, I just saw one move by itself..."

  8. #8
    Junior Member
    Join Date
    Dec 2004
    Location
    uk
    Posts
    22
    here it is
    Attached Files Attached Files
    Charity begins at home.
    But it doesn't end there!

  9. #9
    Junior Member
    Join Date
    Dec 2004
    Location
    uk
    Posts
    22
    ooh sorry wrong file thats someone else's.

    z x move
    space jump
    Attached Files Attached Files
    Charity begins at home.
    But it doesn't end there!

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