Hello,
I need some assistance getting my persistent variables set correctly. I apologize up front if I'm missing something obvious. I'm still quite new to Ren'Py.
What I'm attempting to do is add images to the main screen if the player has progressed past certain points in the story. In my script I have lines such as this:
Code: Select all
$ persistent.checkpoint_1 = True
$ renpy.save_persistent()
I'm using the second line to immediately save the persistent data after the flag is reached, that way the main menu should update even if the player doesn't fully exit the game. Under the main_menu screen I added this:
Code: Select all
if persistent.checkpoint_1:
add "image_1.png"
This is working. Sort of... Now every time the game is started, the image will show up on the main menu regardless of the progression in the story. I've deleted the persistent save, but even without it the image still shows up. After thinking about it for a while, the only thing I could figure was that it wasn't properly reading the value for some reason. To confirm I displayed the value in game and it comes up as 1 automatically, which I believe is how it's displaying True in this case. I'm not sure why that is. I've tried to force the value to False by various means, but with no success. Can anyone offer any advice on how to get this to work?