Help with multiple button press actions

Godot Version

v4.1.1

Question

hello what is the best why to handle multiple button presses? I want to make it so when the player presses shift and left/right the player dashes in that direction, but I’m not able to figure out how to make something trigger when two buttons are pressed

the simplest way is just using 2 if statements or using “and”
example:
If(Input.is_action_just_pressed("left") or Input.is_action_just_pressed("right")) and Input.is_action_pressed("shift")

1 Like

other than what @pham150603 said
you can use input map


and check it by
If(Input.is_action_just_pressed("dash_left"):

5 Likes