Ask here your questions to get help using GDevelop.
By Zanql
#62992 I wish to create a Text entry where people can input their name but I wish to implement a limit to 10 characters. I tried using variables but they don't count when someone holds down the key. Help would be very appreciated.
User avatar
By sleeper_service
#63088 As far as I can tell you should be able to do this as follows:
Create a "compare two expressions" condition (found under "other"). As expression, select the "length of text" condition (under "manipulation on text") and have that check the length of your text variable. You can check that against a fixed or variable value as expression 2. This should allow you to set up follow up events that tell the player that their text is to long, and/or it can serve as a condition preventing the player from entering text longer than allowed.
(I think you can also prevent the player from entering multiple letters by holding a key, via the "execute only once" condition.)