playMaker

Author Topic: Adding 2 Velocities Help  (Read 1315 times)

YoiGames

  • Playmaker Newbie
  • *
  • Posts: 3
Adding 2 Velocities Help
« on: June 26, 2023, 06:02:03 AM »
Hi, I'm fairly new to playmaker and am using the Set Velocity 2d function to make a platformer. Currently I am working on a dash but when I set the velocity of the player in the dash FSM it doesn't work due to the set velocity in the move FSM cancelling each other out.
I was wondering if there was a work around for this or a different method where I can add 2 seperate velocities at the same time from 2 different FSM.
Many thanks if you can help.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: Adding 2 Velocities Help
« Reply #1 on: June 26, 2023, 01:54:06 PM »
Hi.
Disable the move during dash is probably the best way to do this.

You can use events to Enable/disable movement.

YoiGames

  • Playmaker Newbie
  • *
  • Posts: 3
Re: Adding 2 Velocities Help
« Reply #2 on: June 27, 2023, 03:16:10 AM »
Hi.
I tried this and it does work but it completely stops the momentum of the dash as soon as its over which is undesirable so if there still is an alternate way it would be most appreciated.
Much thanks.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: Adding 2 Velocities Help
« Reply #3 on: June 27, 2023, 06:57:19 AM »
for the end part you can set a tween to slow down and also check if a axis is used,
when used, enable move and disable the end part of dash.


i was thinking to set a fsm with 2 variables (moveSpeed / dashSpeed) and calculate together (with a clamp) but it will have issues if player moves to the other side during dash.

You can see our dash here @7:50


YoiGames

  • Playmaker Newbie
  • *
  • Posts: 3
Re: Adding 2 Velocities Help
« Reply #4 on: June 27, 2023, 06:17:09 PM »
Thanks so much this ended up working so all good now.