First--sorry, I'm really new at this.
Anyway, is it possible to create multiple dialog frame images for different characters? I wanted the narrator, for instance, to have a sort of old paper-themed background, while I'd want the characters to speak with a different background image?
Thanks!
Creating different dialog boxes for different characters?
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.
Re: Creating different dialog boxes for different characters
This is possible. The easiest way *I* can think of (I'm a novice so wait around until someone else gives better advice) is simply to replace the current "say" screen with a new one.
http://www.renpy.org/doc/html/screens.h ... n-language
The "say" statement (which is also the default statement that doesn't need the keyword, so you have instead of ) sends its parameters and stuff into a "say" screen, and if you make your own "say" screen, replacing the old one, you can have a conditional within that checks what character is speaking, and adjusts the looks of the screen appropriately, using if-statements.
This creates a normal-looking ADV textbox, with a line for the character name and the rest of the box being text. If you wanted to change the background if the character speaking is, say, named Randalf the Ray, you could do something like this:
This is just one simplistic way to do this.
http://www.renpy.org/doc/html/screens.h ... n-language
The "say" statement (which is also the default statement that doesn't need the keyword, so you have
Code: Select all
character "text"
Code: Select all
say character "text"
Code: Select all
screen say:
window id "window":
vbox:
spacing 10
text who id "who"
text what id "what"
Code: Select all
screen say:
window id "window":
if who == "Randalf the Ray" : # The who variable contains a string that represents the character name. This is sent by the say statement to the window. The what variable contains a string of what is said. Very cute.
background = magicalsuperpowers # This probably looks arse, but something like this.
vbox:
spacing 10
if who: # This bit is here to just make sure that an empty line isn't drawn if the character name is empty.
text who id "who"
text what id "what"
Re: Creating different dialog boxes for different characters
Code: Select all
init:
$ e = Character('eileen', window_background = Frame( 'eileen_frame.png', 10, 10) )
$ narrator = Character('', window_background = Frame('narrator_frame.png', 10, 10 ) )
label start:
e "Hi. I'm using my own window frame now."
'If this string is shown, you will see the text window which is using different frame.'
e 'Well, there is a lot of way to make what you want when you're scripting or programming or.. whatever.'
e 'Anyway this is the way that I suggest to you.'
Who is online
Users browsing this forum: Bing [Bot], DewyNebula