"is_echo ( )
Return if this input event is an echo event (only for events of type KEY, i.e. always false for this type)."
an example pls
What 'echo' does? How it works
- Edited
If true, the key was already pressed before this event. It means the user is holding the key down.
You would check the boolean variable echo when processing an input event.
if echo:
# do something
else:
# do something else
Serhy "Here too you have different possibilities for how exactly the InputEvent should be handled. For example, you can use event.is_echo() to make sure, the event is only once registered''
func _input(event):
if event.is_action("JUMP") && !event.is_echo() && event.is_pressed():
print("jump...")
if event.is_action_released("JUMP"):
print("Up and down!")