Godot Version
4.4.1
Question
Hi! Adding this code triggers pause on any key/mouse click instead of “P”. What’s wrong here?
4.4.1
Hi! Adding this code triggers pause on any key/mouse click instead of “P”. What’s wrong here?
Hi,
_input
is called on any input. Then, in your code, you exit your function (with the return statement) only inside the if event.is_action_pressed("pause")
block, which means that all other inputs will not return.
Try adding something like:
if not event.is_action_pressed("pause"):
return
Thanks again for your help! It worked.