The clock that I currently have 'working' is a timer that I put into the screen file. As it counts down, the images change to whatever time of day it might be(morning, afternoon, night). The amount of seconds below is all testing, but I want to eventually make it longer if it works.
Code: Select all
screen countdown: timer 1 repeat True action If(time > 0, true=SetVariable('time', time - 1), false=[Hide('countdown'), Jump(timer_jump)]) if time <= 2: text str(time) xpos .1 ypos .1 color "#FF0000" at alpha_dissolve else: text str(time) xpos .1 ypos .1 at alpha_dissolve if time <= 5: add "bg morning" xalign 1.0 yalign 0.5 at alpha_dissolve if time <= 3: add "bg afternoon" xalign 1.0 yalign 0.5 at alpha_dissolve if time <= 1: add "bg evening" xalign 1.0 yalign 0.5 at alpha_dissolve
Code: Select all
label timeKeeper: $ time = 5 $ timer_range = 5 $ timer_jump = 'timeKeeper' show screen countdown $ dayCount += 1 label checkMenu: menu: "Check Days": "[dayCount]" jump checkMenu $ checkedMenu += 1 "Do Nothing": "Mkay" jump checkMenu "Checked Menu": "[checkedMenu]" jump checkMenu
How can I keep it running in the background with resetting other dialogue/whatever I'm doing? Maybe I'm just going about this concept the wrong way? For more context, other things I'd want to use this clock for is events happening at certain times- for example, during the 'afternoon' an event can be triggered by being in the right area. Or a character having a birthday on a day in the season.
It certainly feels like there might be an easier way to code it and I'm just making it hard for myself. I would appreciate any help in this!