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.
-
chesarty
- Regular
- Posts: 116
- Joined: Sat Aug 25, 2018 3:07 am
- Completed: 0
-
Contact:
#1
Post
by chesarty » Thu Jun 10, 2021 7:44 pm
So I'd like to have a screen at the start of your game where you select your character's name and pronouns, something like this incredible mockup I made lol.
basically input line for the name, (image)buttons for the pronoun selector and moving forward with the start button
How would one go about doing this? I know how to do the name and pronoun selection in separate lines/screens but I've never tried combining them like this.
The simpler the better

-
henvu50
- Veteran
- Posts: 322
- Joined: Wed Aug 22, 2018 1:22 am
-
Contact:
#2
Post
by henvu50 » Fri Jun 11, 2021 12:41 am
this code lets player enter name
Code: Select all
label start:
define pov = Character("[povname]")
python:
povname = renpy.input("What is your name?", length=32)
povname = povname.strip()
if not povname:
povname = "Pat Smith"
pov "My name is [povname]!"
from:
https://www.renpy.org/doc/html/input.ht ... enpy.input
Get the above working first. make sure indentation is correct.
Then use textbutton to change the pronoun variable.
https://www.renpy.org/doc/html/screens.html#textbutton (you'll use this link a lot as reference, it's how to make a window and put buttons in it.
Code: Select all
default mcPronoun = ""
screen textbutton_screen():
vbox:
textbutton "He/Him" action SetVariable("mcPronoun ", "hehim")
textbutton "She/Her" action SetVariable("mcPronoun ", "sheher")
textbutton "They/Them" action SetVariable("mcPronoun ", "theythem")
"pronoun for mc is [mcPronoun]"
ask more questions if needed.
Users browsing this forum: No registered users