Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | JackMazz |
I’m trying trying to print some text to a richtextlabel every time I hit the space key, the issue is that whenever I hit the space key, it prints the text twice. The code is running in a scene with just a richtextlabel node with the following code.
extends RichTextLabel
var letter = "This is the text"
func _input(event):
if event is InputEventKey and event.scancode == KEY_SPACE and not event.echo:
self.add_text(letter)