How to instantly start and stop acceleration?

So i'm cramming to get this game done. Basically all the art is here so I have no excuses.

I'm recycling (Falling) actors and they move via acceleration.
How do I stop the acceleration and start it up again with buggy jittering?

Thanks in advance for the help!

P.S The forums login function still sucks :D Took me a long time to get on here. :(
Although, I notice it sometimes stays logged in now once you get in so that's kinda good.

Comments

  • SocksSocks London, UK.Member Posts: 12,822
    edited December 2012
    Here's a recycling falling object, not quite sure if this what you meant . . . ?

    http://www.mediafire.com/?8upxd8xstizh1gv

    I agree what you say about the forum login, it always takes a long time to log in, I just try a load of things like resetting my browser, quitting it and opening it up a few times, deleting all the cookies, jumping between a couple of different browsers and so on, you can usually get it working after 10 minutes or so, although I'm never sure what it was I did that allowed me to log in as the fault seems random.

    P.S It doesn't stay logged in for me, all I have to do is move between pages or view another post and that's often enough to log me out.
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Hey man,

    I didn't get a chance to look at Socks demo - buts here's one way to do it.

    You can have your acceleration behavior - no prob.
    When you want to stop accelerating (just standing still) change a Boolean to true and then ok your acceleration in a rule:

    When StopAcceleration is false - accelerate. This way, it will stop accelerating when the is true - change it back to false for it to continue.

    Now, how to make it stop right away:
    Create a rule in your actor :
    Wen game.StopAcceleration is true:
    Timer: for 0.2 seconds
    Constrain attribute self.motion.linear velocity X and Y to 0.

    This should stop it right away and continue when you reset that Boolean to false.

    Hope this is what our looking for.

Sign In or Register to comment.