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
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
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
Comments
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