[Solved] Capturing text input with specific condition

I want to make a scoreboard, where when the player scores higher than the existing one the player will record the score on the scoreboard. so I made this event and it works.


The only problem is when the player has finished typing the name, the inputted text is not stored in the text of global variable BName5.
how can I store text input to the text of global variable BName5 with those conditions?

Did you make the same big chunks of conditions for all score positions?
There must be a smarter way to do this :thinking:
Regarding your issue, you should store the name when Return is pressed, no?
And maybe store NameInput directly, instead of reusing the SubStr?

2 Likes

yes, I wish there was a smarter way to do this since I was new to GDevelop, but hey as long as it works! :joy:

I tried to do this, but it still didn’t work

I just want to take the first three characters, that’s why I use SubStr

oh, I do this too but it still doesn’t work

Isn’t that your problem?

1 Like

I’m not sure :thinking:, but I’ve solved this problem this way:

I put all the conditions to an object that will only tween with that condition.

then after the object has finished tween, the two variables (BScore5 and BName5) will be stored as they should

1 Like