![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | lowpolygon |
I started a new project yesterday. And when I started coding. I started using something like
if Input.is_action_just_released("left_click") :
some random code
Input’s method such as is_action_just_released and is_action_pressed do not show up on the pop up menu when typing Input in gdscript. At first I didn’t think about it much. But then when I manually enter the rest of the code. And run them. Nothing happened. And I didn’t get any error messages. But if I use
func _unhandled_input(event):
if event.is_action_just_pressed("left_click"):
some code here
Then methods mentioned would show up in the pop up menu. I am not sure what I did or if this is a bug or something? Any help would be appreciated
I am using godot 3.3 stable
I tested with 3.3 stable and wasn’t able to repeat the issue you have had.
Like user Help me please suggests, if nothing happens with is_action_
then it’s more likely an Input Map issue.
Try again with the in-built Input Map, for example (with Enter or Spacebar):
func _process(_delta):
if Input.is_action_just_pressed("ui_accept"):
print("Input works in Process")
func _unhandled_input(event):
if event.is_action_pressed("ui_accept"):
print("Input works in InputEvent functions")
Yuminous | 2021-07-15 03:22