POLALA.COM
welcome to my space
X
Welcome to:polala.com
Search:  
 HOME   Jerky Jumping
Jerky Jumping
Published by: anonym 2010-03-17
  • I'm currently in the middle of a game project and came across a problem. Whenever I jump in the game(please try to understand me), the character jumps normally until he hits the floor. When that happens (at the time, he is obviously lower than the floor), he jerks upward to the exact postition of the floor. I know why this happens (the computer checks if his y postion is LOWER than the floor), but I don't know how to fix it. Please help! Here is the code:
    if (pc._y pc._y += yvel;
    }
    if (pc._y>floor) {
    pc._y = floor;
    yvel = 15;
    jumping = false;
    }
    if (jumping == true) {
    pc._y -= yvel;
    yvel -= 2;
    }
    if (Key.isDown(Key.UP) && !jumping) {
    jumping = true;
    }


  • what i would do is change the operator < to <=
    Son of Grok » Blog Archive » Recipe: The SoG Jerky Method::
    Cooking damages the meat and takes so much out of beef jerky. Is it safe? Very. . plus it might untrain the cat to start jumping up on the counter :-).
    http://www.sonofgrok.com/2008/12/recipe-the-sog-jerky-method/
    HOME

    if (pc._y<=floor && !jumping) {
    pc._y += yvel;
    }
    if (pc._y>floor) {
    pc._y = floor;
    yvel = 15;
    jumping = false;
    }
    if (jumping == true) {
    pc._y -= yvel;
    yvel -= 2;
    }
    if (Key.isDown(Key.UP) && !jumping) {
    jumping = true;
    }

    let me know if it helps :!


  • [SCDV-28011] Secret Junior Acrobat - Vol.11 [MP4] [Archive ::
    73 posts - Last post: Apr 4Of course since we're all professional editing critic's in here, "jerky/jumping" editing gets the blame Now don't get me wrong,
    http://www.akiba-online.com/forum/archive/index.php?t-67150.html
    HOME
    hey! thanx alot!


  • thanx :D


  • Hoi

    this solves your prob

    if (pc._y pc._y += yvel;
    }
    if (jumping == true) {
    pc._y -= yvel;
    yvel -= 2;
    }
    // moved the if() down
    if (pc._y>floor) {
    pc._y = floor;
    yvel = 15;
    jumping = false;
    }
    if (Key.isDown(Key.UP) && !jumping) {
    jumping = true;
    }
    flash reads up to down :)
    a good tip when trying solve prob's like this is to look at the code and do very thing step by step in you mind. And when testing thing you should all ways have it after a change has been made :D

    Eidt: fixing typ0 :blush:


  • That won't work... because the code sets his y postion straight back to "floor." And if you were checking if he was equal with the floor, he would not be able to jump. :( Sen! I need you!


  • if (pc._y>floor) {
    pc._y = floor;
    yvel = 15;
    jumping = false;
    }

    Here it looks like your trying to stop the jumping... but why would the movie clip need a velocity if jumping is false.....
    I could be wrong but its worth a shot

    if (pc._y>floor) {
    pc._y = floor;
    yvel = 0;
    jumping = false;
    }


  • Ahhhh nicley spotted!





  • Where's The Advantage In Windows Genuine Advantage?
    Stocks Bounce After S&P Joins Bear Market
    You are looking at:polala.com's Jerky Jumping, click polala.com to home
    #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about Jerky Jumping , Please add it free.
  • know how to manage your marketing
  • promotional gifts offer utility to the recipients
  • optimise your pages before inserting adsense
  • promotional mouse mats the complete business solutions
  • the stunning range of modern promotional caps
  • the advantages of having your own personal business cards design
  • use promo gifts for launching new services
  • five tips for selecting promotional mouse mats
  • partnerships for profit
  • promotional mouse mats gain an edge over other promotional gifts
  • using your business cards to your best advantage
  • countless designs of conference bags
  • how to choose effective promo gifts
  • practical uses of promo gifts
  • three guidelines you need to know about postcard mailing lists
  • benefits of distributing promotional caps during road shows
  • get positive business results with promo gifts
  • it’s all in the details
  • promotional caps are not just for increasing profits
  • make an ad that actually generates a response
  • the key business objectives of promo gifts
  • why not use promotional mouse mats for business growth
  • marketing tips to use right now
  • why to spend on promo gifts
  • considering your marketing materials
  • buy promotional mouse mats to quench your promotional thirst
  • use promotional caps for advertising
  • About us |Contact us |Advertisement |Site map |Exchange links
    Copyright© 2008polala.com All Rights Reserved