Im making a typing game to familiarize myself with this side of godot, and im having some issues with unhandledkey_input(event). I know its SUPPOSED to return 2 values, but I need it to return a value only when im pressing the key, and not when its being released. This is because after the first time its pressed, my code tells it to move to the next letter in the word, which is then though of as incorrect.
Example: The word is "Hello!" so when I press H, it is correct when pressed, but incorrect when released because its checking for the value "e" but gets "h".
Heres the code im using for this currently, if you need to see it. Just fyi, the whole "WordProgress" thing is just to show how far along you are into the word, it has no significance for this issue.
var KeyPressed = event.as_text()
if event == KeyArray[Currentletter]:
if event != "Space":
$WordProgress.text += str(event)
$WordProgress.text += "_"
Currentletter += 1
if Currentletter == LengthOfWord: