playMaker

Author Topic: Confliction between jump and run.  (Read 1209 times)

sk8erchen

  • Playmaker Newbie
  • *
  • Posts: 5
  • Platformer lover
Confliction between jump and run.
« on: April 10, 2022, 06:40:39 PM »
Hi guys,
I'm confused that my running and jumping action are not working properly all the time. When I turn off all the "Every Frame" and "Every Second", she can jump like normal but she can't run(only playing the animation without actually moving a pixel). However when I try to turn on some "Every Frame" and "Every Second", she can run but can't jump! I have followed the tutorial many times but it still doesn't work. Can someone tell me where I am wrong? Thanks!

Zhen

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: Confliction between jump and run.
« Reply #1 on: April 10, 2022, 11:31:11 PM »
Hi.
Which tutorial did you follow?

For moving you might want to use Set Velocity (x only) instead, as translate does not calculate any physics (like hitting wall)

Then for jump you can use force (Y only) or velocity (Y only and preferably with a tween)

sk8erchen

  • Playmaker Newbie
  • *
  • Posts: 5
  • Platformer lover
Re: Confliction between jump and run.
« Reply #2 on: April 11, 2022, 12:11:36 AM »
Thank you! I will do some studying about tween and come back later.
These are the two tutorials I followed:
Movement

Jump

Zhen

Hi.
Which tutorial did you follow?

For moving you might want to use Set Velocity (x only) instead, as translate does not calculate any physics (like hitting wall)

Then for jump you can use force (Y only) or velocity (Y only and preferably with a tween)

sk8erchen

  • Playmaker Newbie
  • *
  • Posts: 5
  • Platformer lover
Re: Confliction between jump and run.
« Reply #3 on: April 11, 2022, 11:06:42 AM »
Finally I have figured out the way!
In the movement FSM, I leave the Vector section as X0 Y0, and in the jump FSM, I leave the Vector section the same, it seems they conflict with each other. When I turn both off to None and uncheck Every Frame in Set Velocity 2d for Jump, everything becomes normal. My character now can run and jump like a human.

Thanks!