How to disable saving temporarily?

Forum organization and occasional community-building.
Forum rules
Questions about Ren'Py should go in the Ren'Py Questions and Announcements forum.
Post Reply
Message
Author
Nightmarecool2
Newbie
Posts: 12
Joined: Thu Aug 11, 2022 5:38 pm
Contact:

How to disable saving temporarily?

#1 Post by Nightmarecool2 »

So basically what I'm trying to do is prevent the user from accessing the saves/loads/quicksaves during a minigame so that they don't cheat. So far from what I've seen, it's possible to completely the remove the saves/loads screen by removing everything under the screen label that corresponds to it. However, I haven't seen any temporary solutions. How could I possibly prevent the player from saving or loading or accessing these screens for a limited amount of time?

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3794
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: How to disable saving temporarily?

#2 Post by Imperf3kt »

During the part you want to disable saving, set the variable "_game_menu" to None and disable keybinds for the escape key, and probably disable the quick menu also with $quick_menu = False

Then once the player is past the point you want to disable saving, re-enable them.

The default _game_menu is save
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

Nightmarecool2
Newbie
Posts: 12
Joined: Thu Aug 11, 2022 5:38 pm
Contact:

Re: How to disable saving temporarily?

#3 Post by Nightmarecool2 »

That seems to have worked. Thank you!

Post Reply

Who is online

Users browsing this forum: Bing [Bot]