I am stuck at triggering an event, which should happen 6 hrs after charging the mobile phone. So not matter when the player starts charging the phone, the event needs to be triggered after 6 hrs.
This is my code for the time:
Code: Select all
label world_time:
if world_time_minute >=60:
$ world_time_minute = world_time_minute -60
$ world_time_hour = world_time_hour + 1
while world_time_minute >= 60:
$ world_time_minute = world_time_minute -60
$ world_time_hour = world_time_hour + 1
if world_time_hour >=8 and world_time_hour <=20:
$ world_day_night = "Day"
else:
$ world_day_night = "Night"
if world_time_hour >=24:
$ world_time_hour = world_time_hour -24
$ world_daycount = world_daycount + 1
if world_day <=6:
$ world_day = world_day + 1
else:
$ world_day = 1
return
The problem is solved!