Input action error suggestions are only printed when using event.is_action_pressed()
, not Input.is_action_pressed()
#51634
Closed
Description
Godot version
4.0.dev, 3.3.2
System information
Fedora 34, GeForce GTX 1080 (NVIDIA 465.31)
Issue description
Not really a bug, but rather a feature that was only partially implemented. This is a reminder for me (or anyone else) to implement it: #35666 (comment)
The feature in question was backported to 3.x
, so this should also be done in both master
in 3.x
.
Steps to reproduce
- Create an action named
move_forward
(without a "s"). - Add the following code to a script.
func _physics_process(delta):
# It's `move_forwards` with a "s", this time.
# You need to have a typo that's close enough to the intended string for the suggestion to be printed
# once this feature is implemented.
if Input.is_action_pressed("move_forwards"):
pass
- Watch the error spam in the console, but notice it doesn't make any suggestions because we are using the Input singleton instead of an InputEvent.
Minimal reproduction project
N/A