Is it possible to execute Jump() later?

Is it possible to execute Jump() at some point of the state “Cube_Jump_Start”?
Or force the AnimationBP to update between Jump() and “InputAction Jump” is also alright.
Because part of my animation within the “Cube_Jump_Start” the character is still on the ground. I did this to make the character have a more nature movement, which need to execute the Jump() a little bit later. But now, once I hit space the character jumps away, and not wait for the animation for the right point to jump.

Simplest solution would be just to use “delay” node between input and actual “jump”. But it won’t work on it’s own, it needs a tiny change in your animation bp graph and character’s bp.

You’ll need some variable that holds info whether player is jumping or not and use it in animation bp for switching state instead of what you’re currently using (as I assume, you use some built-in function for determining whether player is jumping or not).

So, the flow would be like:

  1. Input event (for jumping)
  2. Set that variable to “is jumping” state.
  3. Delay node for X seconds.
  4. Jump

And then for landing:

  1. Landed event
  2. Set that variable to “not jumping” state.

In anim bp, use that variable for determining whether player is in jumping state or not and use that for switching from Cube_Idle_Walk to Cube_Jump_Start.

Cheers.

1 Like