playMaker

Author Topic: How to insert a mid-status inbetween walk/run and idle?  (Read 1544 times)

sk8erchen

  • Playmaker Newbie
  • *
  • Posts: 5
  • Platformer lover
How to insert a mid-status inbetween walk/run and idle?
« on: April 09, 2022, 05:52:29 AM »
Hi guys, I just managed to create an FSM to control my character to walk and run, and flip side. However I think it's a bit too sudden if the character becomes idle right after running. So I want to add a "brake" action after the button is up and before the character is fully stopped. But I just can't figure out how. Can someone give some advise? Thanks!

Zhen

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: How to insert a mid-status inbetween walk/run and idle?
« Reply #1 on: April 09, 2022, 04:53:40 PM »
Hi.
if you use velocity, you can use a tween to go from x to 0

sk8erchen

  • Playmaker Newbie
  • *
  • Posts: 5
  • Platformer lover
Re: How to insert a mid-status inbetween walk/run and idle?
« Reply #2 on: April 10, 2022, 09:16:53 AM »
Thanks but could you share more detailed info? I found get/set velocity 2d and a bunch of tweens but couldn't figure out how to use them, will be appreciated if there is an example.

Thanks
Zhen

Hi.
if you use velocity, you can use a tween to go from x to 0

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: How to insert a mid-status inbetween walk/run and idle?
« Reply #3 on: April 10, 2022, 10:43:50 AM »
hi.
how is your walk/run setup?
Are you using set velocity or a character controller or something else?
Also are you using sprites or a 3d character?

Here is a example on my move system.

the important part to look at is the Move Left and Brake short.