Is it possible to create a "don't show screen" option?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
Nanahs
Veteran
Posts: 310
Joined: Wed Aug 22, 2018 5:50 pm
Contact:

Is it possible to create a "don't show screen" option?

#1 Post by Nanahs »

I programmed my game to show screens with messages like "Merry Christmas", "Happy New Year", etc.

That's easy to create a button with "toggle screen" function to show and hide. But as soon the the person clicked on that label again, the screen would appear again. And the person would have to click the button to hide it agan.

So I was wondering, is it possible to create an option like "don't show me messages"?

And when chosen, this function would hide "screen crhistmas, screen newyears, screen birthday", etc.

And another one "show me messages" that would display those screens if the person wants to?

Everything I could think about was the "toggle screen" function, but the game wouldn't "remember/save". Do you know what I mean? :lol:

So, basically two buttons. One to enable and another one to disable "screen crhistmas, screen newyears, screen birthday".

Thanks.

User avatar
Kia
Eileen-Class Veteran
Posts: 1037
Joined: Fri Aug 01, 2014 7:49 am
Deviantart: KiaAzad
Discord: Kia#6810
Contact:

Re: Is it possible to create a "don't show screen" option?

#2 Post by Kia »

yes, you can have a persistent variable that is checked before showing the screen: https://www.renpy.org/doc/html/persistent.html

Code: Select all

if persistent.msgs:
	show screen masages...

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]