I'm trying to have a character do a dash move by pressing twice in directional pad (so I guess a "press, release, press" logic), but cannot seem to have the logic right.
I have some code like this:
var move_right = Input.is_action_pressed("move_right")
// here I tried some logic to detect player pressed twice in the directional pad
// do dash move
player.set_scale( Vector2(1, 1) )
player.move_local_x( player_speed * delta )
I tried using
is_echo() in the
Also tried storing the previous action press (or previous action release) in a variable.
Just can't seem to get it right.
It either did not work or the character would just dash by holding directional pad right.