Working on a HUD display that changes the display of time based on a variable.
What I'm trying to do is use a variable that is basically hours, and once it gets to a certain point, it resets to 0, which i'll use to determine various scenes.
The DT variable just keeps ticking up, and never ends up resetting.
I've also tried..
That doesn't seem to work either.
Anyone able to identify what I'm doing wrong?
Thanks!
What I'm trying to do is use a variable that is basically hours, and once it gets to a certain point, it resets to 0, which i'll use to determine various scenes.
Code:
default dt = 0
# The game starts here.
label start:
jump whatever1
label whatever1:
show screen daytimeinfo
$ dt += 1
"Test"
jump whatever2
label whatever2:
show screen daytimeinfo
$ dt += 1
"label 2"
jump whatever1
screen daytimeinfo:
zorder 10
if dt > 12:
$ dt = 0
text "Day [dt]" xpos 0.02 ypos 0.01
return
I've also tried..
Code:
default maxdt = 24
#samelabelsasabove
screen daytimeinfo:
zorder 10
if dt > maxdt:
$ dt = 0
text "Day [dt]" xpos 0.02 ypos 0.01
Anyone able to identify what I'm doing wrong?
Thanks!
Last edited: