How to get an actor to slow down and then stop

CurtandAshCurtandAsh Member Posts: 18
edited November -1 in Working with GS (Mac)
How do you get an actor to slow down and then stop using the keys on a keyboard? ):

Comments

  • CurtandAshCurtandAsh Member Posts: 18
    tshirtbooth said:
    can you give more info? like hen do you need it to slow down and will the key stop him or start the slow down?

    alright. when you push the (for example) right keyboard key down, the actor moves to the right. when you release the key, we want the actor to slow down and then stop. we dont want it to stop instantly once the key is released. i hope that makes sense :x
  • mrfunkleberrymrfunkleberry Member Posts: 424
    break one of his/her legs. or..

    When slowmedown = 1
    set velocity = motion.x+motion.y
    when velocity > 4
    set motion.x = motion.x/10
    set motion.y = motion.y/10
    otherwise
    set motion.x = 0
    set motion.x = 0

    Something like that. Probably needs tweaking if it does indeed work at all. Sorry no time to test myself.

    Or simply apply the accelerate and drag behaviours :)
  • quantumsheepquantumsheep Member Posts: 8,188
    mrfunkleberry said:
    break one of his/her legs. or..

    Best solution by far!

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • scitunesscitunes Member, Sous Chef Posts: 4,047
    what about just dropping a drag behavior in the otherwise (assuming you are using accelerate for the movements) Just play with the drag setting. You may also need a rule in the otherwise section that says when self linear X is < (some low number) change (or maybe constrain) self linear X to 0
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    @QS - you're on a roll! Are you celebrating 4.20 or something?
Sign In or Register to comment.