[SOLVED]Dialogue in a screen

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
rebellare
Regular
Posts: 34
Joined: Mon Nov 06, 2017 9:34 am
Contact:

[SOLVED]Dialogue in a screen

#1 Post by rebellare »

So, getting quickly to the point,
I have a label that's a hallway and I want some of the door imagebutton to show a dialogue when clicked.
For example, now I got:

In the hallway buttons screen:
imagebutton ... action (Show(day_1_button_ban)

And another screen
screen day_1_button_ban:
window id "window"
xbox:
mc "(I should go take a shower first.)"

After launching it says "mc" isnt a valic xbox statement. I get that it's not recognizing the defined Character "mc" but I don't know how to do it. I know I can put:
text "(I should go take a shower first.)"
But, how do I show that it's the mc that's thinking it? (I also defined a color into the "mc" Character so I want it to be shown here to.)
I went through documentation but didn't find anything exatcly like this. Also, if there's another way of doing this, I'm all ears.
Last edited by rebellare on Mon Nov 26, 2018 8:15 am, edited 1 time in total.

User avatar
Enchant00
Regular
Posts: 136
Joined: Tue Jan 12, 2016 1:17 am
Contact:

Re: Dialogue in a screen

#2 Post by Enchant00 »

Is the mc's name in a different box from the text or is it just beside it?

If it's simply in this format:
MC : I should go take a shower first

You can just simply supply the variable within the text displayable as so.

Code: Select all

    screen day_1_button_ban:
        window id "window"
        xbox:
            text '[name]: I should go take a shower first.' 
You can also create a style to apply to your text displayable if you'll keep re-using it over and over again. Likewise, if the name is separated from the text then just create a window where the name should be and position it accordingly. There are more ways but it's really what you prefer in the end.

rebellare
Regular
Posts: 34
Joined: Mon Nov 06, 2017 9:34 am
Contact:

Re: Dialogue in a screen

#3 Post by rebellare »

Good enough, thanks =)

Post Reply

Who is online

Users browsing this forum: No registered users