Implementing a refresh move history function and a more specific launch direction for an airdash

Currently I have this blueprint model set up:

And I really need it to be able to do two things in particular before I start adding animation. One is that I need it to refresh the input history after it has been detected that the key has been hit twice. And I also need it to be able to launch in specific directions(probably via a different velocity method?) so that I can map appropriate facing directions for each keyboard character and their respective forward left right backward directions.

I tried utilizing this way of refreshing the input history:
[http://gregmladucky.com/blog/?p=690][2]

But I can’t find the proper way to plug it into my current function.

If someone could help point me in the direction of using a better velocity launching method then that would help greatly as well. I think trying to either change or modify the get forward vector part of the function and have tried a couple things so far.

An extra thing that I’m going to want once I can achieve these two things is to be able to only use these particular types of dashes in the air, as I want to create separate dash styles for grounded-movement.

I would greatly appreciate the help, thank you!

Hello Motoko. I saw your question in discord. And if you’ve seen my last answer, that had a problem when the camera turned in the middle of the double tap.

Here is the Event Graph. With each directional input requesting their respective dash direction.

In here you see the Check Dash Double Tap macro, which receives a input and check if it’s been requested before. Don’t forget to set the initial value of Last Input to 255. (Also, use Get Time Seconds, because it’s the in-game time count. Get Real Time Seconds is the active system time which counts even if the game is paused)

And here’s the Try Dashing function, which checks if the player is either walking or falling, then proceeds to dash if it’s possible.

217924-dashexample-04.png

And here are the properties.

Now one thing to note, it’s a pretty bare bones logic. You might need to adjust the inputs the more complex your character movement gets.

I hope it helps! Let me know if I missed something.

First of all I want to say thank you for responding to this. It’s definitely a functional step in the right direction. However I did come across one problem in particular.
I tried to plug in my original launch character method in place of your Do Dash function within the Try Dashing function. However I was not able to add a Flow Control Delay after the launch character script in that place(Refer to the end of my initial BP image to see what I’m talking about). The dash at this point is not working with launch character plugged into that place, with or without the original end components.

With that said, can I see your Do Dash function?

Delay is a latent function and can only be added in the Event Graph, they’re not allowed inside other functions. But don’t worry, here’s how I would do it.

I would never use Delay functions for movement commands, because you might want to check if the command is still being processed, and with a Delay function I’m not sure if there’s a way to do that other than messing your Even Graph with booleans.

On the Even Graph, Add a new event (In this case I named Stop Dash), the connect the functions to immediately stop character movement.

Before I had nothing inside here, just a Print String to tell me if things were working. But here’s how I would do the dash. After setting the velocity in the character movement, I activate a timer to tell when the Dash should stop, it will call the Stop Dash event in the Event Graph. And don’t forget to connect a Timer Handle, because you’ll need it later.

With the timer handle, put it in the Try Dashing function, it’ll check if the dashing is still happening and will not attempt to dash again in case it’s active.

217947-dashexample-08.png

Here are the newly created properties.

Originally the delay was set up so that the user couldn’t infinitely dash, and although I seemed to have plugged in everything you’ve listed here I still can’t get it to work.
I attempted to plug in that Do Dash at the end of the Try Dash part mentioned recently and replicated everything as you put it here and it still doesn’t work. Could there perhaps be something missing?

Make sure Can Ground Dash and Can Air Dash are initially set to true. Also, now I noticed the last delay is an interval for the Dash after it’s been executed. So here it is.

In this context, I like to use Delay since it’s just an interval to reactivate a boolean. I also added a Stop Dash Immediately which can be called while dashing is still processing.

To make things cleaner, you can create a function to check if the character can dash. And replace the logic in Try Dashing with this function. (Don’t forget to put up there to check if Dash is Enabled)

Just like this~

Set DashEnabled to false at the end of Do Dash function.

217958-dashexample-13.png

Here are the new properties.