Cannot Get Character Specific Dialouge Box To Appear

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
spaceCassette
Newbie
Posts: 3
Joined: Mon Mar 18, 2019 7:42 pm
Contact:

Cannot Get Character Specific Dialouge Box To Appear

#1 Post by spaceCassette » Wed Mar 20, 2019 1:18 am

I have tried MULTIPLE! tutorials and nothing works, when I try to assign a specific box for a characters dialouge it just doesn't show up. The text appears, but behind it is nothing! I've been trying to figure it out myself for the past few days, but sadly I only have an estimated one(1) brain cell and nothing I've tried has worked. So, I thought it'd be best to ask around before I "accidentally" punt my computer into the sun. What I have currently is below and the error message is attached. I'm very sorry if this is an incredibly dumb question, but help would be SO VERY APPRECIATED! I also don't know how this forum format works (im new) and I can't find my glasses, so I apologize if I posted this in the wrong place.

Code: Select all

define n = Character(_("Newt"), color="#264449")
define narrator = Character(_(" "), color="#264449", background Image("gui/narratorbox.png", xalign=0.5, yalign=1.0))
define mom = Character(_("Mom"), color="#264449")
Error Message:

Code: Select all

File "game/script.rpy", line 4: invalid syntax
    Character(_(" "), color="#264449", background Image("gui/narratorbox.png", xalign=0.5, yalign=1.0))
                                                       ^

Ren'Py Version: Ren'Py 7.1.3.1092
Sorry again I know this is quite possibly a very dumb question, but I am hella desperate and like I said none of the solutions I've found have helped.

lacticacid
Regular
Posts: 36
Joined: Fri Nov 23, 2018 6:44 pm
Contact:

Re: Cannot Get Character Specific Dialouge Box To Appear

#2 Post by lacticacid » Wed Mar 20, 2019 6:32 am

Ah, I ran into the same problem a while ago. Instead of background Image(), try using window_background=. Like this:

Code: Select all

define n = Character(window_background="gui/textboxnar.png", what_ypos=41, what_color="#5aa7c4")
(Note: if you do a transition, the default box could flash before the narrator box appears. I personally just use the "window hide" statement before narrator's lines to fix this issue. There might be a better way to fix this, I'll work on finding it. I'll update this if I do.)
~There is almost always a better, easier way to approach a problem.~

spaceCassette
Newbie
Posts: 3
Joined: Mon Mar 18, 2019 7:42 pm
Contact:

Re: Cannot Get Character Specific Dialouge Box To Appear

#3 Post by spaceCassette » Wed Mar 20, 2019 10:19 am

Just tried this out, thanks so much for responding, and although I don't get an error message this time The Text Box Still Doesn't Appear :( Maybe something is wrong with how my default textbox is set up (it's been working, but I wouldn't be surprised if something about it was causing this) does this look correct?:

Code: Select all

style window:
    xalign 0.5
    xfill True
    yalign gui.textbox_yalign
    ysize gui.textbox_height

    background Image("gui/textbox.png", xalign=0.5, yalign=1.0)

lacticacid
Regular
Posts: 36
Joined: Fri Nov 23, 2018 6:44 pm
Contact:

Re: Cannot Get Character Specific Dialouge Box To Appear

#4 Post by lacticacid » Wed Mar 20, 2019 6:01 pm

spaceCassette wrote:
Wed Mar 20, 2019 10:19 am
Just tried this out, thanks so much for responding, and although I don't get an error message this time The Text Box Still Doesn't Appear :( Maybe something is wrong with how my default textbox is set up (it's been working, but I wouldn't be surprised if something about it was causing this) does this look correct?:

Code: Select all

style window:
    xalign 0.5
    xfill True
    yalign gui.textbox_yalign
    ysize gui.textbox_height

    background Image("gui/textbox.png", xalign=0.5, yalign=1.0)
Is your second textbox the same size as the first one? I would also recomment to check if your second textbox is actually in the gui folder or not.
~There is almost always a better, easier way to approach a problem.~

Post Reply

Who is online

Users browsing this forum: Google [Bot]