I'm trying to make a screen that show the current day and daytime and, when the player clicks it, jump to the next part of the day.
Here's the code:
Code: Select all
screen time():
imagebutton yalign 0.0:
idle "gui/time_gui.png"
action [If(daytime >= 3, true=(SetVariable("daytime", 0), If(day >= 6, true=SetVariable("day", 0), false=SetVariable("day", day + 1))), false=SetVariable("daytime", daytime + 1))]
hbox xalign 0.028 yalign 0.004:
if day <= 0:
text "Monday" size 25 color "#ffffff"
elif day <= 1:
text "Tuesday" size 25 color "#ffffff"
elif day <= 2:
text "Wednesday" size 25 color "#ffffff"
elif day <= 3:
text "Thursday" size 25 color "#ffffff"
elif day <= 4:
text "Friday" size 25 color "#ffffff"
elif day <= 5:
text "Saturday" size 25 color "#ffffff"
elif day <= 6:
text "Sunday" size 25 color "#ffffff"
text " / " size 25 color "#ffffff"
if day <= 0:
text "Morning" size 25 color "#ffffff"
elif day <= 1:
text "Afternoon" size 25 color "#ffffff"
elif day <= 2:
text "Evening" size 25 color "#ffffff"
elif day <= 3:
text "Night" size 25 color "#ffffff"
text "[name]" xalign 0.023 yalign 0.038 size 25 color "#ffffff"
text "[level]" xalign 0.158 yalign 0.064 size 28 color "#ffffff"In particular, show a certain daytime only with a certain day. Here the abbinations:
Monday / Morning
Tuesday / Afternoon
Wednesday / Evening
Thursday / Night
Friday /
Saturday /
Sunday /
I don't know what to do and what cause this weird problem. Any idea?