Input name in game
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.
Input name in game
I know how to let the player choose the main character name (%(player_name)s) but what's the function to make it appear when the main character speaks?
Example:
Boy: Hey, %(player_name)s, stop!
%(player_name)s: I can't!
I need a little bit help xD
Example:
Boy: Hey, %(player_name)s, stop!
%(player_name)s: I can't!
I need a little bit help xD
- jesusalva
- Regular
- Posts: 88
- Joined: Mon Jul 22, 2013 5:05 pm
- Organization: Software in Public Interest, Inc.
- IRC Nick: jesusalva
- Github: pazkero
- itch: tmw2
- Location: Brazil
- Discord: Jesusalva#4449
- Contact:
Re: Input name in game
OK, I've read that somewhere in LSF or Renpy Documentation:
Tested, DynamicCharacter() do the work.
Very common, so, with a bit more of search, you find Documentation for it.
Code: Select all
init:
$ povname = ""
# And this is a DynamicCharacter that has the same stored in
# povname.
$ pov = DynamicCharacter("povname", color=(192, 64, 64, 255))
label start:
$ povname = renpy.input("What is your name?") or "NayraSoul"
"Boy" "Stop, [povname]!"
pov "I can't!"
Very common, so, with a bit more of search, you find Documentation for it.
Jesusaves/Jesusalva
Re: Input name in game
When i put:
"Boy" "Stop, [povname] !"
The result is povname, not the name chosen.
"Boy" "Stop, [povname] !"
The result is povname, not the name chosen.
Re: Input name in game
Do you use an old version of Ren'Py, or use a new one but disable that feature anyway?
Re: Input name in game
I use Ren'py 6.10.2
- trooper6
- Lemma-Class Veteran
- Posts: 3712
- Joined: Sat Jul 09, 2011 10:33 pm
- Projects: A Close Shave
- Location: Medford, MA
- Contact:
Re: Input name in game
Is there a reason you haven't updated to the newest Renpy?
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?) Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?) Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978
Re: Input name in game
I downloaded it yesterday, the first version I saw, I didn't knew what was the new one XDU It's that the problem?
- trooper6
- Lemma-Class Veteran
- Posts: 3712
- Joined: Sat Jul 09, 2011 10:33 pm
- Projects: A Close Shave
- Location: Medford, MA
- Contact:
Re: Input name in game
It might be the problem. I know that [povname] is the current way of doing things with variables and that %(povname)s is the old way of doing things...so there may be some sort mixup there. I'd try the [povname] style after you have updated to the newest renpy and see if that fixes things.
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?) Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?) Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978
Re: Input name in game
Thanks, I updated it and it works perfect!
Who is online
Users browsing this forum: No registered users