Page 1 of 1

[solved] Screen that is hidden the first time?

Posted: Tue Sep 29, 2020 10:35 pm
by Harimak
Hi, how are you? I have a question, I hope you can answer me.

At the beginning of the game I want there to be a screen that "forces" the player to play the prologue.
Then select the route.
BUT
After playing the first time, when you start the game again [on another occasion], s/he is not forced to play the prologue. Instead, s/he can directly choose the route.
Image

I tried to use:

Code: Select all

 $ prologue = okay/no 
But I can't use them properly, or maybe there is another function, I'm new to this. ;v;)??

Re: Screen that is hidden the first time?

Posted: Wed Sep 30, 2020 2:00 am
by hell_oh_world
Have you looked on persistent variables? https://www.renpy.org/doc/html/persiste ... en%20renpy.

Code: Select all

default persistent.played_already = False

label start:
  if not persistent.played_already:
    call prologue
    
  call screen route_chooser
  
label prologue:
  $ persistent.played_already = True
  return

Re: Screen that is hidden the first time?

Posted: Wed Sep 30, 2020 1:20 pm
by Harimak
hell_oh_world wrote:
Wed Sep 30, 2020 2:00 am
Have you looked on persistent variables? https://www.renpy.org/doc/html/persiste ... en%20renpy.

Code: Select all

default persistent.played_already = False

label start:
  if not persistent.played_already:
    call prologue
    
  call screen route_chooser
  
label prologue:
  $ persistent.played_already = True
  return
It has worked for me, thank you very much. I did not know this type of variables :)!!