Hey, guys!
I'd like to have a possibility to change some UI components (like what-frame, who-frame, ctc icon, etc.) in order to make them look different in day and night. I haven't got any ideas and I failed to find any useful info, so I'm asking for your help
Different UI in different daytime
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.
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.
-
- Lemma-Class Veteran
- Posts: 2299
- Joined: Mon Feb 06, 2012 9:50 pm
- Completed: Icebound, Selenon Rising Ep. 1-2
- Projects: Selenon Rising Ep. 3-4
- Organization: Fastermind Games
- Deviantart: sundownkid
- Location: NYC
- Contact:
Re: Different UI in different daytime
You have to use ConditionSwitch on the images you use for each picture.
For example:
For example:
Code: Select all
image textbox = ConditionSwitch(
"time_of_day == 'day'", "textbox_day.jpg",
"time_of_day == 'night'", "textbox_night.jpg",
)
init:
$ time_of_day = 'day'
label start:
$ time_of_day = 'day'
n "It's daytime"
$ time_of_day = 'night'
n "it's nighttime"
- Donmai
- Eileen-Class Veteran
- Posts: 1960
- Joined: Sun Jun 10, 2012 1:45 am
- Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
- Projects: Slumberland
- Location: Brazil
- Contact:
Re: Different UI in different daytime
Maybe include those UI elements on your character definition, and define each character twice?
Code: Select all
define an = Character('Abraham', color = '#99FF33', ctc="ctc1", ctc_timedpause=Null(), ctc_pause="ctc1", ctc_position="nestled", window_background="ui/dialogue_night.png")
define ad = Character('Abraham', color = '#99FF33', ctc="ctc2", ctc_timedpause=Null(), ctc_pause="ctc2", ctc_position="nestled", window_background="ui/dialogue_day.png")
Code: Select all
scene twilight
show abraham running
with dissolve
"Time is running, and so is Abraham."
ad "I have to get there before the day ends. I better run faster."
ad "Oh, no! What's that?"
play sound "crash"
scene night
show abraham despair
with vpunch
an "Oh, no! Too late. Night has fallen already."
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)
TOIRE NO HANAKO (A Story About Fear)
- Kinmoku
- Miko-Class Veteran
- Posts: 591
- Joined: Mon Aug 11, 2014 9:39 am
- Completed: One Night Stand
- Projects: VIDEOVERSE
- Tumblr: gamesbykinmoku
- itch: kinmoku
- Location: Germany
- Contact:
Re: Different UI in different daytime
I'm trying to do a similar thing and am new to editing UI in Renpy.
I have it set up to switch during the game, but it's staying on the default UI. Do I do something to style.window.background in options.rpy?
I have it set up to switch during the game, but it's staying on the default UI. Do I do something to style.window.background in options.rpy?
Who is online
Users browsing this forum: Google [Bot]