changing text box

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
DebiruHaato
Newbie
Posts: 4
Joined: Thu May 21, 2015 9:34 am
Completed: None.
Projects: Five Nights at Freddy's Meets Anime
Tumblr: Aria-inthestarless-night
Deviantart: DebiruHaato
Contact:

changing text box

#1 Post by DebiruHaato »

I nailed about changing text box to custom made one, but I want to change the text box in occasions such as when the Bad End or Good End is executed.

but how?

SundownKid
Lemma-Class Veteran
Posts: 2299
Joined: Mon Feb 06, 2012 9:50 pm
Completed: Icebound, Selenon Rising Ep. 1-2
Projects: Selenon Rising Ep. 3-4
Organization: Fastermind Games
Deviantart: sundownkid
Location: NYC
Contact:

Re: changing text box

#2 Post by SundownKid »

Use a variable. Then change the text box graphic based on a conditional branch in the "say screen" in screens.rpy

User avatar
DebiruHaato
Newbie
Posts: 4
Joined: Thu May 21, 2015 9:34 am
Completed: None.
Projects: Five Nights at Freddy's Meets Anime
Tumblr: Aria-inthestarless-night
Deviantart: DebiruHaato
Contact:

Re: changing text box

#3 Post by DebiruHaato »

Can you explain it? I'm new to Renpy, so I don't quite understand...

User avatar
Donmai
Eileen-Class Veteran
Posts: 1960
Joined: Sun Jun 10, 2012 1:45 am
Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
Projects: Slumberland
Location: Brazil
Contact:

Re: changing text box

#4 Post by Donmai »

Everytime you want to change the dialogue window background you can do it by simply having several versions of the same character, each one with a different dialogue box.
Confused?
Okay, I will try to explain. So, imagine you have three different text boxes for three different occasions. Let's say you have a character named John Doe. You declare that character several times:

Code: Select all

init:
    define jd1 = Character('John Doe', color = '#99FF33', window_background="jd_sunny.png")
    define jd2 = Character('John Doe', color = '#99FF33', window_background="jd_moonlight.png")
    define jd3 = Character('John Doe', color = '#99FF33', window_background="jd_rainy.png")
Now if you want the first text box to appear when John Doe speaks, just use the first character definition:

Code: Select all

    jd1 "Oh, what a beautiful morning! I think I'll go for a walk."
Then suddenly the weather change. Let's say your third dialogue box will look better on a rainy scene:

Code: Select all

    jd3 "Oh, no! It started to rain!
Understood? Yes, it's a dirty trick.
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot]