[SOLVED] $ quick_menu = False doesn't work within a screen
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.
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.
[SOLVED] $ quick_menu = False doesn't work within a screen
I have a problem where the quick menu doesn't disappear when I'm on my dressup/customization screen, whereas in-game the $ quick_menu = False command works fine... What could be the issue there?
Last edited by chesarty on Fri Jan 08, 2021 1:46 pm, edited 1 time in total.
- RicharDann
- Veteran
- Posts: 286
- Joined: Thu Aug 31, 2017 11:47 am
- Contact:
Re: $ quick_menu = False doesn't work within a screen
Since quick_menu is a global variable already created in the default files, you're supposed to run that statement from a label in script, to change it's value.
If you write that line on a screen, it doesn't modify the existing global variable, but instead creates a new screen variable, scoped locally to the screen, with the same name but different from the default one. So if you want to disable quick menu when your screen appears, you can either:
Or add an on statement to your screen (I haven't tested this but it should probably work):
If you write that line on a screen, it doesn't modify the existing global variable, but instead creates a new screen variable, scoped locally to the screen, with the same name but different from the default one. So if you want to disable quick menu when your screen appears, you can either:
Code: Select all
label start:
$ quick_menu = False
call screen my_screen
Code: Select all
screen my_screen():
on 'show':
action SetVariable('quick_menu', False)
on 'hide':
action SetVariable('quick_menu', True) # so it reappears when screen is hidden
The most important step is always the next one.
Re: $ quick_menu = False doesn't work within a screen
Thanks man, the on statement worked flawlessly!RicharDann wrote: ↑Fri Jan 08, 2021 1:40 pm Since quick_menu is a global variable already created in the default files, you're supposed to run that statement from a label in script, to change it's value.
If you write that line on a screen, it doesn't modify the existing global variable, but instead creates a new screen variable, scoped locally to the screen, with the same name but different from the default one. So if you want to disable quick menu when your screen appears, you can either:Or add an on statement to your screen (I haven't tested this but it should probably work):Code: Select all
label start: $ quick_menu = False call screen my_screen
Code: Select all
screen my_screen(): on 'show': action SetVariable('quick_menu', False) on 'hide': action SetVariable('quick_menu', True) # so it reappears when screen is hidden
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3791
- Joined: Mon Dec 14, 2015 5:05 am
- itch: Imperf3kt
- Location: Your monitor
- Contact:
Re: [SOLVED] $ quick_menu = False doesn't work within a screen
There's more "on" states too that you may find needed, such as on replaced, which i find necessary sometimes.
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
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Who is online
Users browsing this forum: No registered users