NVL entry background (changing background with variable) ? [SOLVED]

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
idka
Newbie
Posts: 6
Joined: Fri Jul 27, 2018 1:35 am
Contact:

NVL entry background (changing background with variable) ? [SOLVED]

#1 Post by idka »

So I'm making a dating sim and I've customized NVL mode to look like a phone and each entry to look like a message. I set the background for the nvl_entry style to be a message bubble, but what I can't seem to figure out is how to set a variable or something that changes the image (to a bubble that's a different color) based on who is speaking.

Code: Select all

style nvl_entry:
    xfill True
    ysize gui.nvl_height
    background "gui/msg[num].png"
I have msg1.png and msg2.png, and I was thinking I could have an if statement change [num] to correspond to the correct image, but I'm not sure how to accomplish that. Thanks for any help!
Last edited by idka on Sat Aug 18, 2018 9:21 pm, edited 1 time in total.

User avatar
Kia
Eileen-Class Veteran
Posts: 1039
Joined: Fri Aug 01, 2014 7:49 am
Deviantart: KiaAzad
Discord: Kia#6810
Contact:

Re: NVL entry background (changing background with variable) ?

#2 Post by Kia »

it can be done while defining your character, you can have all kind on differences between your characters text and window
https://renpy.org/doc/html/dialogue.htm ... er-objects

idka
Newbie
Posts: 6
Joined: Fri Jul 27, 2018 1:35 am
Contact:

Re: NVL entry background (changing background with variable) ?

#3 Post by idka »

Thank you!

Post Reply

Who is online

Users browsing this forum: No registered users