Hi Community,
I have seen some games where when player click a few locations, the day will change from morning to night.
May I ask does anyone able to provide some sample codes for setting up a day to a week schedule (like morning, noon, evening, night, monday-sunday) in renpy?
When the player selected the a location = event, I would like the menu bar which has the image for Morning/Noon/Night to change together with the background of Morning/Noon/Night, and also the player's color.
[Solved] How to create code for setting up a day to a week schedule (like morning, noon, evening, night, monday-sunday)?
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.
[Solved] How to create code for setting up a day to a week schedule (like morning, noon, evening, night, monday-sunday)?
Last edited by Trafagal on Wed Feb 09, 2022 8:29 am, edited 1 time in total.
Check out some of my stuffs here:https://linktr.ee/theartofjoshlab
Art Portfolio: https://www.instagram.com/theartofjoshlab/
Working on a personal Visual Novel~
Art Portfolio: https://www.instagram.com/theartofjoshlab/
Working on a personal Visual Novel~
-
rayminator
- Miko-Class Veteran
- Posts: 754
- Joined: Fri Feb 09, 2018 12:05 am
- Location: Canada
- Contact:
Re: How to create code for setting up a day to a week schedule (like morning, noon, evening, night, monday-sunday)?
this will help you
Code: Select all
screen TopBar():
hbox:
xalign 0.003
spacing 10
if month == 1:
$ mm = _("Jan")
elif month == 2:
$ mm = _("Feb")
elif month == 3:
$ mm = _("March")
elif month == 4:
$ mm = _("Apirl")
elif month == 5:
$ mm = _("May")
elif month == 6:
$ mm = _("June")
elif month == 7:
$ mm = _("July")
elif month == 8:
$ mm = _("August")
text "[mm]":
size 30
color "#0099cc"
outlines [(3, "#000000", 0, 0)]
font "font/Lobster-Regular.ttf"
text " ":
size 30
color "#0099cc"
outlines [(3, "#000000", 0, 0)]
font "font/Lobster-Regular.ttf"
if daytime == 0:
$ dds = _("Morning")
elif daytime == 1:
$ dds = _("Afternoon")
elif daytime == 2:
$ dds = _("Evening")
elif daytime == 3:
$ dds = _("Night")
if day == 0:
$ bb = _("Sunday")
elif day == 1:
$ bb = _("Monday")
elif day == 2:
$ bb = _("Tuesday")
elif day == 3:
$ bb = _("Wed")
elif day == 4:
$ bb = _("Thursday")
elif day == 5:
$ bb = _("Friday")
elif day == 6:
$ bb = _("Saturday")
text "[bb]":
size 30
color "#0099cc"
outlines [(3, "#000000", 0, 0)]
font "font/Lobster-Regular.ttf"
text " ":
size 30
color "#0099cc"
outlines [(3, "#000000", 0, 0)]
font "font/Lobster-Regular.ttf"
text "[dds]":
size 30
color "#0099cc"
outlines [(3, "#000000", 0, 0)]
font "font/Lobster-Regular.ttf"Re: How to create code for setting up a day to a week schedule (like morning, noon, evening, night, monday-sunday)?
Thank you so much ! I have been looking for this for sometime.rayminator wrote: ↑Sat Feb 05, 2022 12:26 amthis will help you
map.pngCode: Select all
screen TopBar(): hbox: xalign 0.003 spacing 10 if month == 1: $ mm = _("Jan") elif month == 2: $ mm = _("Feb") elif month == 3: $ mm = _("March") elif month == 4: $ mm = _("Apirl") elif month == 5: $ mm = _("May") elif month == 6: $ mm = _("June") elif month == 7: $ mm = _("July") elif month == 8: $ mm = _("August") text "[mm]": size 30 color "#0099cc" outlines [(3, "#000000", 0, 0)] font "font/Lobster-Regular.ttf" text " ": size 30 color "#0099cc" outlines [(3, "#000000", 0, 0)] font "font/Lobster-Regular.ttf" if daytime == 0: $ dds = _("Morning") elif daytime == 1: $ dds = _("Afternoon") elif daytime == 2: $ dds = _("Evening") elif daytime == 3: $ dds = _("Night") if day == 0: $ bb = _("Sunday") elif day == 1: $ bb = _("Monday") elif day == 2: $ bb = _("Tuesday") elif day == 3: $ bb = _("Wed") elif day == 4: $ bb = _("Thursday") elif day == 5: $ bb = _("Friday") elif day == 6: $ bb = _("Saturday") text "[bb]": size 30 color "#0099cc" outlines [(3, "#000000", 0, 0)] font "font/Lobster-Regular.ttf" text " ": size 30 color "#0099cc" outlines [(3, "#000000", 0, 0)] font "font/Lobster-Regular.ttf" text "[dds]": size 30 color "#0099cc" outlines [(3, "#000000", 0, 0)] font "font/Lobster-Regular.ttf"
Check out some of my stuffs here:https://linktr.ee/theartofjoshlab
Art Portfolio: https://www.instagram.com/theartofjoshlab/
Working on a personal Visual Novel~
Art Portfolio: https://www.instagram.com/theartofjoshlab/
Working on a personal Visual Novel~
Who is online
Users browsing this forum: Bing [Bot], enaielei, Google [Bot]