The problem I realised, is that if the player saves before or immediately after the screen is closed, the new value of the variables is not saved. Provided the player advances the main script at least one statement after closing the screen, the variables are saved properly.
So I'd like to find some way to trigger these variables to be saved if the player saves immediately after closing the screen.
I doubt that this will help much, but just in case, here is a sample of the code I use to set the variables
Code: Select all
def processG01Qs():
global g01_q_response, g01_text, g01_q01_answers, g01_q02_answers, g01_q03_answers, g01_q04_answers, g01_q05_answers, g01_q06_answers, g01_q01_complete, g01_q02_complete, g01_q03_complete, g01_q04_complete, g01_q05_complete, g01_q06_complete, g01_rose, g01_cassy, g01_olivia, g01_wbb_name
g01_q_response = g01_q_response.strip().lower()
if g01_text == g01Q_t_q01:
if g01_q01_answers[0] in g01_q_response and g01_q01_answers[1] in g01_q_response:
g01_text = g01Q_fbpos_q01
g01_q01_complete = True
renpy.show ("tr c_cas_01 dubious")
else:
g01_text = g01Q_fbneg_q01
renpy.show ("tr c_cas_01 negative")
elif g01_text == g01Q_t_q02:
if g01_q02_answers.count(g01_q_response) > 0:
g01_text = g01Q_fbpos_q02
g01_q02_complete = True
renpy.show ("tr c_cas_01 smiling")
else:
g01_text = g01Q_fbneg_q02
renpy.show ("tr c_cas_01 negative")