It does get saved, tried your code and I see what you mean, not really familiar with calls but I guess even though you save at some point like after where you clicked the advance time and the value changes, the game saves from the point before the call happens so it starts from the beginning. if you'll try putting some dialogues and saving and calling the screen again you'll see that the value is saved.
Code: Select all
screen test_screen:
vbox:
align (0.5, 0.5)
text "{b}[clock.tod]{/b}"
text "{b}[clock.day]{/b}"
textbutton "{b}ADVANCE TIME{/b}":
action Function(clock.adv_clock)
textbutton "CONTINUE THE GAME" action Return()
label test_label:
call screen test_screen # advance the time then click the continue game button and save below...
"d1"
"d2"
"d3"
# save when d3 appears then load that save and continue the game...
"d4"
call screen test_screen # should display the saved values right
return
so on a short note, renpy handles calls differently. if you try to save while a screen is called, the game saves from the point before the call happens, if that makes sense. and hopefully, other knowledgeable experts here can explain how renpy handle saves while on call.
you can also try to define the variable if you're skeptical about what I said about defining and defaulting them, if you save at some point and load the save you'll realize that the values are getting saved even though they're defined, well... they're not, it's an illusion though. the changed value is the very recent value of the variable and the variable still exists while the game is running so it looks like the value is saved, but if you'll close the game, the variables cease to exist, so once you run the game again and load the same save file you'll see that the values will default to the value that you set when you defined them.