How can I use "if" to make the quick menu TRUE and FALSE?

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
yoyuchi
Regular
Posts: 58
Joined: Sat Jul 09, 2022 1:39 pm
Contact:

How can I use "if" to make the quick menu TRUE and FALSE?

#1 Post by yoyuchi » Sun Sep 25, 2022 2:34 pm

HELLO Everyone.
I want to turn on and off the quick menu according to the conditions. The same script is used in two places: in gameplay and in scene replay.
During game play, the quick menu must be TRUE, and at the end of the scene replay, it must be FALSE.
Can I use the if statement to give the condition at the end of the script, "If it's scene replay, make the quick menu FALSE"?

This is my script's end part.
If it's a scene replay, I'd like to make the quick menu FALSE at the end of the script.

Code: Select all

    ...........
    stop music fadeout 2.0
    stop sound
           
    scene black with fadescene
    pause 1.0

    " if replay()~ "

    $ renpy.end_replay()
    $ persistent.s000_00h = True
    $ persistent.h01a = True
    $ persistent.h01b = True
    $ persistent.h01c = True
    $ persistent.h01d = True
      
    jump s001_00
I think I can give the condition of FALSE the quick menu after "if replay()~", what should I write?
Thank you so much in advance.

User avatar
Ocelot
Eileen-Class Veteran
Posts: 1882
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: How can I use "if" to make the quick menu TRUE and FALSE?

#2 Post by Ocelot » Sun Sep 25, 2022 3:11 pm

The most optimal way would be to modify quick_menu screen to not display itself while in replay:
if quick_menu:if quick_menu and not _in_replay:
< < insert Rick Cook quote here > >

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], Majestic-12 [Bot]