Issues with holding down movement buttons via event timer + gates (blueprints provided)

Hey folks,

I’m working on something of a real-time grid-based game wherein players can move from tile to tile via basic up/down/left/right controls. Because I want to give players the option of holding down a directional input and to continue moving in that direction.
To facilitate this, I implemented a “set timer by event” node after EventBeginPlay, and then use said timer to enter gates and use respective directional keys to open them (see attached image).
This solution works quite well with the one annoying caveat that the player can end up not moving upon button press if it doesn’t coincide with the timer. Holding down the button gives the required behavior, but not necessarily pressing it.
I’ve fudged around with moving the “set timer” node around after the directional input is made, but it doesn’t seem to give the requisite behavior.

My second question is whether or not using the Sequence Gate after the Timer Event is totally kosher. I don’t exactly want to give precedence to any direction over another, but I do need a way to get that custom event to every gate. Any ideas?

I’m happy to provide more blueprints if necessary.

Create a bool for each direction and repeat movement as long as bool is true. You can then use the pressed/released part to control the bool itself.

Thank you for your response!

Doing a bool check on tick introduces a different but anticipated issue. First, I think I should explain that this grid based game uses a vector array for its positions, and just does some basic math/collision detection to find out whether or not the requested move is valid or not. By doing a bool check on tick, the player can basically move across the entire board in an instant, which is obviously undesirable behavior.


I implemented some delays in attempt to curtail this behavior, but they also introduce strange behavior, wherein a player can still be moving a few extra spaces after having let go of the directional key.


For further reference, I have attached the blueprints for the interpolated movement of the pawn, perhaps changes can be made there?


Thank you!