"Back" function and menu choices

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
Razka
Newbie
Posts: 12
Joined: Wed Jan 01, 2020 10:58 pm
Projects: Testament Legacy - Ch.1
Contact:

"Back" function and menu choices

#1 Post by Razka »

I've been testing my game for a while, and I found out that you can apparently use "Back" after you make a choice, and that basically breaks the whole game.
For example, if you've got a menu with 2 affection events. You're supposed to just select 1, and I've got some code to check it (basically this: viewtopic.php?p=523263#p523263), but if you go back all the way to the menu after you get the "+ Affection" you can actually select both.

Is there any known way to prevent this?

User avatar
gas
Miko-Class Veteran
Posts: 842
Joined: Mon Jan 26, 2009 7:21 pm
Contact:

Re: "Back" function and menu choices

#2 Post by gas »

define config.fix_rollback_without_choice = True
If you want to debate on a reply I gave to your posts, please QUOTE ME or i'll not be notified about. << now red so probably you'll see it.

10 ? "RENPY"
20 GOTO 10

RUN

User avatar
Razka
Newbie
Posts: 12
Joined: Wed Jan 01, 2020 10:58 pm
Projects: Testament Legacy - Ch.1
Contact:

Re: "Back" function and menu choices

#3 Post by Razka »

That didn't work at all for me, it just removed the selected attribute from the menus.
But on the plus side I used that bit to discover all the related functions and I managed to solve it anyway, so thanks!

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]