Cannot change dialogue box in-game.

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
newbiemate
Regular
Posts: 85
Joined: Tue Dec 19, 2017 1:36 pm
Contact:

Cannot change dialogue box in-game.

#1 Post by newbiemate »

I have three different dialogue box images I'd like to display depending on game conditions. I implemented a suggestion by @pytom in 2009: viewtopic.php?p=70175#p70175

However it doesn't seem to work for me, and I'm not sure if this is outdated information. This is what I have:

Code: Select all

init python:
    style.window.background = ConditionSwitch(
        "frame == 1", Frame("images/textbox1.png", 616, 216),
        "frame == 2", Frame("images/textbox2.png", 616, 216),
        "frame == 3", Frame("images/textbox3.png", 616, 216),
    )

label start:
    $ frame = 1
    "This uses the first frame"
    $ frame = 2 
    "This uses the second frame"
    $ frame = 3
    "This uses the third frame"
    return
My images are 616x216 pixels, and they are located in the "images/" folder. But all I see is black background and black dialog box: https://imgur.com/a/7mEkxrK

I have also put the images in gui/, but this does not work either.

What am I doing wrong?

Post Reply

Who is online

Users browsing this forum: Google [Bot], piinkpuddiin