Variables updating only when opening the menu twice
Hello everybody! I'm making a visual novel for one of my courses. I've made a journal from scratch that follows the player's choices throughout the game. I finished up everything but when I started testing, I noticed I have to open the journal twice so that it updates to the latest events.
Here's how it looks like in short:
screen journal():
tag menu
use game_menu(_("Journal"), scroll="viewport"):
style_prefix "journal"
vbox:
textbutton "Act 1":
style_prefix "act"
textbutton "Scene 1" action ShowMenu("act1scene1"):
style_prefix "scene"
textbutton "Scene 2" action ShowMenu("act1scene2"):
style_prefix "scene"
textbutton "Scene 3" action ShowMenu("act1scene3"):
style_prefix "scene"
textbutton "Act 2":
style_prefix "act"
textbutton "Scene 1" action ShowMenu("act2scene1"):
style_prefix "scene"
textbutton "Scene 2" action ShowMenu("act2scene2"):
style_prefix "scene"
textbutton "Scene 3" action ShowMenu("act2scene3"):
style_prefix "scene"
textbutton "Act 3":
style_prefix "act"
textbutton "Scene 1" action ShowMenu("act3scene1"):
style_prefix "scene"
textbutton "Scene 2" action ShowMenu("act3scene2"):
style_prefix "scene"
textbutton "Scene 3" action ShowMenu("act3scene3"):
style_prefix "scene"
screen act1scene1():
tag menu
use game_menu(_("Journal"), scroll="viewport"):
style_prefix "journal"
hbox:
xalign 0.5
yalign 0.5
textbutton "Return" action ShowMenu("journal")
vbox:
if gui.about:
text "[gui.about!t]\n"
if reached_act1_scene1 == False:
label "???"
if journal_wokeup == True:
label "Waking up..."
text _("∙ I woke up in a strange place with no memories whatsoever... I should try looking around and find out where I am.")
if journal...
Here's how it looks in the script/dialogue:
...
oriwhat "(Just... very big eyes and black scleras-)"
oriwhat "(!??)"
$ journal_wokeup = True
...
At that point, it should be in the journal immediately - but it only shows up when I open it twice.
And this goes on and on. Lots of ifs and $ journal_whatevers because my python is very limited and, to be honest, I don't understand the more indepth coding either because I'm stupid and/or because of language problems D: anyone got a clue on why I have to open it twice? Did I do something wrong? Is there a workaround to fix it? Any help much appreciated!