Page 1 of 1

Interactive director for text box placement?

Posted: Thu Jul 12, 2018 12:03 pm
by Kinmoku
Hi all,

I'm wondering if (or how) I can use the interactive director to move the position of the text box? I'm guessing not, but thought I'd ask.

My next game has text appear is bubbles next to the characters (like in a comic book) and I wanted to know if there was an easier way of going about it rather than defining different characters for each position.

Thanks :)

Re: Interactive director for text box placement?

Posted: Thu Jul 12, 2018 2:00 pm
by Per K Grok
Kinmoku wrote: Thu Jul 12, 2018 12:03 pm Hi all,

I'm wondering if (or how) I can use the interactive director to move the position of the text box? I'm guessing not, but thought I'd ask.

My next game has text appear is bubbles next to the characters (like in a comic book) and I wanted to know if there was an easier way of going about it rather than defining different characters for each position.

Thanks :)

I think this might work.

In screen.rpy you add your own windows styles for each position

Code: Select all

style window2:
    xpos 100
    ypos 100
    background Image("ballon1.png")

style window3:
    xpos 500
    ypos 200
    background Image("ballon2.png")

style window4:
    xpos 900
    ypos 200
    background Image("ballon3.png")
 
When a character is to talk you do

$ renpy.say(m, "blabla qwerty", window_style="window2")

A quick test indicates that it might work.

Re: Interactive director for text box placement?

Posted: Fri Jul 13, 2018 11:38 am
by Kinmoku
Per K Grok wrote: Thu Jul 12, 2018 2:00 pm When a character is to talk you do

$ renpy.say(m, "blabla qwerty", window_style="window2")

A quick test indicates that it might work.
Hey thanks :) This is a much better way of doing it that I hadn't thought of.

I'm wondering, because I'd like to avoid typing $ renpy.say(m, "blabla qwerty", window_style="window2") each time if possible, is there something I can do so the window style stays that way until said otherwise?

Re: Interactive director for text box placement?

Posted: Fri Jul 13, 2018 3:40 pm
by Per K Grok
Kinmoku wrote: Fri Jul 13, 2018 11:38 am ---

I'm wondering, because I'd like to avoid typing $ renpy.say(m, "blabla qwerty", window_style="window2") each time if possible, is there something I can do so the window style stays that way until said otherwise?
You could make a function with arguments for who, what and window style. Window style could be stored in a variable and function could get the third argument from that variable. That way window style would remain the same until you change the variable.

I'm slightly doubtful if it would be worth to do that. Copy/paste would perhaps be enough to hold down the amount of typing.

Re: Interactive director for text box placement?

Posted: Mon Jul 16, 2018 8:31 am
by Kinmoku
Per K Grok wrote: Fri Jul 13, 2018 3:40 pm I'm slightly doubtful if it would be worth to do that. Copy/paste would perhaps be enough to hold down the amount of typing.
Okay, I'll copy and paste it each time and adjust accordingly. It shouldn't take that much time :)

Although, I've just run into a problem with menus. The code wouldn't run when I used the text in this format.

I changed it to this:

Code: Select all

    $ renpy.say(k, "S’okay, I guess.\nI don’t really get on with anyone there.", window_style="window_wide_s1_floorkatie")
    
    menu:
        extend ""
        
        "How come?":
        #etc
        
        "Me neither":
        #etc
... but then it shows the last line of normal dialogue, which was 100s of lines ago!

I suppose I can define characters for the menu lines, but again, there's quite a lot of them and it could get messy very fast.