Player Names
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.
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.
-
- Newbie
- Posts: 5
- Joined: Tue Nov 19, 2019 10:31 pm
- Contact:
Player Names
Hi everyone, I'm working on a story, and I've figured out how to allow the player how to put a name in for their character, but I don't know how to get that to become the default name on the text box, or how to get the other characters to use that name when they're talking. Any advice?
- Palas
- Newbie
- Posts: 15
- Joined: Thu Feb 14, 2013 3:19 pm
- Soundcloud: palasvuash
- itch: pequigames
- Location: Brazil
- Contact:
Re: Player Names
I suppose you want to display the player's input, right? You just have to use [variable name] in the text string.
Check this page out.
Check this page out.
-
- Miko-Class Veteran
- Posts: 793
- Joined: Fri Feb 09, 2018 12:05 am
- Location: Canada
- Contact:
Re: Player Names
it should be something like this
for the default name it should look like something like this
for the line should look like this
Code: Select all
python:
povname = renpy.input("What is your first name?")
povname = povname.strip()
if not povname:
povname = "Yuuichi"
Code: Select all
define a = Character("[povname]", type=adv)
define Yuuichi = Character("Yuuichi")
define ch = Character("Chika")
Code: Select all
ch "Hello there how are you today, [povname]."
a "Just fine."
- Kia
- Eileen-Class Veteran
- Posts: 1040
- Joined: Fri Aug 01, 2014 7:49 am
- Deviantart: KiaAzad
- Discord: Kia#6810
- Contact:
Re: Player Names
I would change the character's name directly, saves you one step of defining an extra variable, but at the end there's not that much of difference between the two methods
Code: Select all
python:
name = renpy.input("My name is...")
name = name.strip()
if name:
p.name = name
"Hello [p.name]"
- isobellesophia
- Miko-Class Veteran
- Posts: 979
- Joined: Mon Jan 07, 2019 2:55 am
- Completed: None
- Projects: Maddox and Friends! (AI Teacher friend), Friendly Universities! (Soon)
- Organization: Friendly Teachers series
- Deviantart: SophBelle
- itch: Child Creation
- Location: Philippines, Mindanao
- Contact:
Re: Player Names
There are many to make that one, so i suggest this.
Code: Select all
label naming:
python:
name = renpy.input(_("Anything! But real names i really wanted."))
name = name.strip() or __("Student")
Who is online
Users browsing this forum: No registered users