tltr;
i have a textfield for a playername.
to save the name, i have a “save-Button” next to the textfield and it works as expected.
now i want to give the player the chance to save the name by just pressing the “enter”/“return”-Key,
but it did not work…
I don’t know if there is a solution.
But the reason is that the TextInput object is rendered in a special way “outside of the game”.
Mousclick etc. will also not work in the input field, just like the cursor is on object condition.
I think it would be helpful if there were 2 additional conditions. One for when “enter” is pressed like IsSubmitted. Another for when text is changed. Maybe submit a request.
I created a work around a while ago but I never thoroughly tested it. If you setup the object as multiple line (text area) it will accept the enter key. You then check for the NewLine() and remove it. I added the angle action just to test it. Although, that’s the only testing I’ve done.
More safeguards might be needed. I used 2 substrings just in case the enter key is pressed in between letters unstead of just at the end.