Hi people... when i press a key (for ex: "w"), an animation plays from animated sprite, another key (for ex: "s") does the same for another animation. if i press these two keys quickly, one of them usually does not work and i think pressing one key before releasing another one is the cause of this problem, what i wanna do now is when i press one of them, another one become disable. how should i do this, thank you :) (im using godot 2.1.5)
How do we disabe an input key when another one is pressed?
Try a boolean to check if one key is pressed and in a condition
`var is_keyPressed = false
func _process(delta): if (Input.is_key_pressed("KEY_W") and not is_keyPressed): is_keyPressed = true play animation`
4 years later
Megalomaniak added the Godot Help tag .