T
tamation
Guest
I'm really struggling with setting typing limitations right now. Ideally I'd like to have it so that once the player's keyboard_string exceeds a width of 248 pixels, they can't type anything else to add to the string until some characters have been removed.
I couldn't figure out how to stop keyboard_string from receiving inputs, so I tried to set a limit for the string width instead, and when it is exceeded have it automatically remove the most recent character you typed.
This is what I have so far:
currentstring = string_width(keyboard_string);
lastchar = string_pos(keyboard_lastchar,keyboard_string);
if currentstring > 248 { string_delete(keyboard_string,lastchar,1) }
I've been trying a few different set-ups with it, but I've had absolutely no luck so far. Any help or tips on a better system of limiting the width of keyboard_string would be greatly appreciated.
I couldn't figure out how to stop keyboard_string from receiving inputs, so I tried to set a limit for the string width instead, and when it is exceeded have it automatically remove the most recent character you typed.
This is what I have so far:
currentstring = string_width(keyboard_string);
lastchar = string_pos(keyboard_lastchar,keyboard_string);
if currentstring > 248 { string_delete(keyboard_string,lastchar,1) }
I've been trying a few different set-ups with it, but I've had absolutely no luck so far. Any help or tips on a better system of limiting the width of keyboard_string would be greatly appreciated.