Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Enquest |
Its a bid embarrising and almost to afraid to ask. I got trouble reading the documentation.
What is my problem. Is see all these functions I think I can use but when trying them it gives an error. Looking at the documentation it seem simple. So I’m missing some point.
For example InputEventKey — Godot Engine (3.0) documentation in English
I see that I should be able to use:
if InputKeyEvent:
do something
Then this does not work as expected I look up Member variables
bool echo - If true the key was already pressed before this event. It means the user is holding the key down.
bool pressed - If true the key’s state is pressed. If false the key’s state is released.
So I think I can enter
InputKeyEvent.echo or something else. But all keep returning errors.
Can somebody explain me how I should read this. InputKeyEvent is just example what is puzzling me.
Aha I do understand that InputKeyEvent you need to use in the func _input
But how can you know from the docs?