Code: Select all
default money = 0
default clicks = 0
label start():
jump test
screen scr_pause():
pass
screen scr_test():
vbox:
text "Money: [money]"
text "Clicks: [clicks]"
textbutton "I need money!" action [SetVariable('money', money + 100), Jump('test')]
label test():
show screen scr_test
$ clicks += 1
call screen scr_pause
If I click it multiple times, then rollback (both values are rollbacked properly to their initial values), then roll forward, I don't get my money back (but "clicks" is changed properly).
Obviously, the difference is that "money" variable is changed from a screen, but I don't know if this behavior is intended or I'm missing something?
Is there a way to have the desirable behavior, when I can roll back/forward and restore a value changed inside a screen?