Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
label yourName:
scene
show black onlayer bg
call screen name_screen with dissolve
$ player_name = _return
$ player_name = player_name.strip()
$ player_name = player_name.lower()
$ player_name = player_name.title()
This works well, however, when the player just presses space they are able to just have an empty name. How can I prevent players from entering the name after just spaces?
Last edited by simba975 on Sat Feb 10, 2024 5:34 am, edited 1 time in total.
label yourName:
scene
show black onlayer bg
call screen name_screen with dissolve
$ player_name = _return
$ player_name = player_name.strip()
$ player_name = player_name.lower()
$ player_name = player_name.title()
if not player_name:
"Please enter a valid name!"
jump yourName
jump elsewhere