So i have an in-game map with quests to select. I define them with variables, something like
Code: Select all
if persistent.quest1 == "active":
imagebutton idle "quest1emblem.png"
elif persistent.quest1 == "finished":
None
Code: Select all
$ persistent.quest1 = "active"
(quest code here, blah blah, dialogue)
$ persistent.quest1 = "finished"
Another example of this is going back to the map from an active quest. I want to disable the option to return to the map at some points, i made a menu option that goes like this:
Code: Select all
if persistent.map == "1" or persistent.map == "0":
if renpy.get_screen("map"):
textbutton _("MAP") action Return()
elif persistent.map == "0":
textbutton _("MAP") action Notify("You can't return to the map right now")
elif persistent.map == "1":
textbutton _("MAP") action Confirm("Are you sure you want to return to the map?", yes=Call("map"), no=None)
But here i am encountering the same problem as i do with quests. Say i have the quest code
Code: Select all
$ persistent.map == "1"
(quest starts here)
$ persistent.map == "0"
(important scene starts here, so you can't exit to the map anymore)
$ persistent.map == "1"
(scene ends, and map is available again)
What do i do? Thank you in advance!