In my project I have created a long series of the same screen with unlockable contents (a sort of homemade imagemap CG Gallery) and I wanted the screen to change every time I wrote a "flag" in the script (correct me if I'm using inapt words). So I tried using this code:
Code: Select all
screen extra_events:
tag menu
if persistent.unlock == "CG1":
use extra_events_1
if persistent.unlock == "CG2":
use extra_events_2
else:
use extra_events_0
Code: Select all
$ persistent.unlock = "CG1"
$ persistent.unlock = "CG2"
The problem is that if I use this kind of code, the only "persistent.unlock" string considered by renpy is the last one, so that if I don't go over the last "persistent.unlock" string playing the game, nothing in my events screen changes and the code "prints" the else command, making me see the "extra_events_0" screen. That being said, I understand this code won't work because the persistent can be used only with a choice menu to change the main menu appearance after a choice for example, but it actually seems strange to me that a variable system like the one I need doesn't exist at all. So, if you have some tips to tell me, I'd appreciate.
Thank you in advance.
