input name, how to enable show_two_window? [SOLVED!]

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.
Post Reply
Message
Author
User avatar
renoa-heartilly
Regular
Posts: 115
Joined: Sat Jul 17, 2010 2:37 am
Completed: مقهى الضائعون, Arabic Translations for Ren'py, Pretty Please
Projects: حور, BB project, dentist drama
Organization: stanza studio (creative circle)
Contact:

input name, how to enable show_two_window? [SOLVED!]

#1 Post by renoa-heartilly »

hello *_*
I was making a test game to try out ren'py 6.14 and tried to have the character's name input by the user
i used the script in the wiki

Code: Select all

# The phrase in the brackets is the text that the game will display to prompt 
# the player to enter the name they've chosen.

    $ me = renpy.input("ما هو اسمك؟")

    $ me = me.strip()
# The .strip() instruction removes any extra spaces the player 
# may have typed by accident.

#  If the player can't be bothered to choose a name, then we
#  choose a suitable one for them:
    if me == "":
        $ me="مجهول"
 
# Now the other characters in the game can greet the player.
  
    w "Pleased to meet you, %(me)s!"
but now i have a problem that the say_who window isn't picking up the style, even if "default two_window = True" in screens.rpy (it doesn't seem to work, by the way, i have to manually add it to the character information when defining them)
i tried adding show_two_window=True everywhere i could think of, but nothing works.
the screen looks like this with the normal character i defined from the beginning
(still didn't put in any background)
Image

and this is with the inputted name مجهول that doesn't use a separate box for the name
Image

i don't know where else to look D: is there something outdated in the script? Or maybe someplace for me to insert the show_two_window=True to define the character? (renpy gives me an error whenever i try to add it to any of the defining strings)
thank you for your time and effort!
Last edited by renoa-heartilly on Mon Nov 26, 2012 2:35 pm, edited 1 time in total.

User avatar
Hiddlestoners
Regular
Posts: 126
Joined: Sun Jul 01, 2012 9:27 am
Completed: Thinking Of You [KN]
Projects: PERPLEXITY [Mystery VN], simplicity [KN,Fluff,GxB,BxG]
Contact:

Re: character name is input, how to enable show_two_window?

#2 Post by Hiddlestoners »

You would still use the show_two_window=True in the same way as other characters, as well as defining your character like so:

Code: Select all

$ me = DynamicCharacter("me", show_two_window=True)
The 'me' but can be replaced by whatever you want to use to define the character like you do generally in the script :)
ENOSHIMA BOWL!
Image

User avatar
renoa-heartilly
Regular
Posts: 115
Joined: Sat Jul 17, 2010 2:37 am
Completed: مقهى الضائعون, Arabic Translations for Ren'py, Pretty Please
Projects: حور, BB project, dentist drama
Organization: stanza studio (creative circle)
Contact:

Re: character name is input, how to enable show_two_window?

#3 Post by renoa-heartilly »

wow thank you very much XD i didn't know where to put the code, so i googled it and found this page
http://www.renpy.org/wiki/renpy/doc/ref ... cCharacter

from there i tried several combinations until i found one that worked without errors
turned out i confused myself a little by naming all the attribues (me) since the wiki page shows them being named different things povname and pov
anyway, here's the code that worked well for me in case someone needs it

Code: Select all

label start:
    "whoa" 
    $ myname = ""
    $ myname = renpy.input("What was my name again?")

#  If the player can't be bothered to choose a name, then we
#  choose a suitable one for them:
    if myname == "":
        $ me="Nameless"
        $ myname = me.strip() #this kept giving me errors so you can disable it if it bothers you

# The .strip() instruction removes any extra spaces the player 
# may have typed by accident.  
    $ me = DynamicCharacter("myname", show_two_window=True)

    me "Oh right, my name was %(myname)s! How forgetful of me."   
    
it works fine now, two windows and everything XD thank you!

Post Reply

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot], Milkymalk, wizard_jpg