Code: Select all
default day = 1
default time_of_day = ["morning", "evening", "night"]
default end_of_day = time_of_day[-1] # this can automatically pick up the last element of time_of_day as above.
default money = 200
label start:
label advance(increment = 1):
python:
while increment > 0:
if time_of_day[0] == end_of_day:
day += 1
time_of_day.append(time_of_day.pop(0))
increment -= 1
return()
Code: Select all
label Menu_Downstairs:
if time_of_day[day] == "morning":
scene lounge with dissolve
if time_of_day[day] == "evening":
scene lounge with dissolve
else:
scene lounge night with dissolve
Code: Select all
label bathroom:
if time_of_day[day] == "morning" or time_of_day[day] == "evening":
scene bday
else:# time_of_day[day] == "night":
scene bnight
menu:
"Have a bath.":
jump bath
"Exit bathroom":
jump Menu_Downstairs
label bath:
if time_of_day[day] == "morning" or time_of_day[day] == "evening":
scene intub
"I enjoy a nice relaxing bath."
call advance(1)
jump bathroom
if time_of_day[day] == "night":
scene bnight
"It's too late for a bath."
jump bathroom
So, i have no errors and it displays the morning backgrounds in the morning.
But, after my first choice, it turns to the night background, even though it's only the evening.
I want it to show day scenes during morning and evening and only night scenes at night time.
I don't know what I've done wrong. Please help me.