Lemma Soft Forums

Supporting creators of visual novels and story-based games since 2003.


Visit our new games list, blog aggregator, IRC channel, and Discord (new).
Activation problem? Email pytom@bishoujo.us.
It is currently Wed Mar 29, 2017 10:44 pm

All times are UTC - 5 hours [ DST ]


Forum rules


This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like, and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.



Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Mon Mar 20, 2017 8:41 pm 
Regular
User avatar

Joined: Sat Mar 18, 2017 3:27 pm
Posts: 31
Good day to all (^_^)/

At certain moments during game play I would like to have the quick menu disappear briefly, to simulate the feeling of a short cut scene as it were.

By default, pressing 'H' on the keyboard hides the interface. I am looking for a similar effect, though it should be triggered at some points in the script, so that when the player reaches that part of the story, the quick menu disappears, until it is triggered to come back again.

I found this post at the forum where basically the same question has been asked before:https://lemmasoft.renai.us/forums/viewtopic.php?f=8&t=12229
PyTom replied:
Quote:
The quick menu is included as part of the screen, rather than its own screen.

Generally, you don't want dialogue in your splashscreen - that's not what it's for. However, if you do want dialogue in the splashscreen, you can always change the say screen to read:

Code:
if quick_menu:
use quick_menu


Then you can update the quick_menu variable to control when the quick menu is shown.
I've added that bit of code to the say screen, but I'm not sure what to do next.

I've tried defining "quick_menu" as a boolean which is set to either False or True at certain points during the story like so:
Code:
$ quick_menu = False
...though this seems ineffective and is most likely completely wrong.

Could some one please explain further how to implement the method as described by PyTom?


Last edited by SethRiley on Tue Mar 21, 2017 1:14 am, edited 1 time in total.

Top
 Profile Send private message  
 
PostPosted: Mon Mar 20, 2017 8:56 pm 
Veteran
User avatar

Joined: Sat Sep 03, 2016 4:00 am
Posts: 408
I would just add showif inside the quickmenu screen to hide the hbox which wraps all of those textbuttons.
Then set a variable in script.rpy to tell the quickmenu to show or hide it.

_________________
My avatar is courtesy of Mellanthe


Top
 Profile Send private message  
 
PostPosted: Mon Mar 20, 2017 9:09 pm 
Regular
User avatar

Joined: Sat Mar 18, 2017 3:27 pm
Posts: 31
Thank you indoneko. Please forgive the noobish nature of my reply, I am new to Ren'Py.

I've tried putting "define persistent.showquickmenu = True" in the script, and using "$ persistent.showquickmenu = False" to flip the value during the story. My quick screen doesn't have an hbox, just some image buttons:
Code:
screen quick_menu():

    zorder 100

    showif persistent.showquickmenu = True:
   
        imagebutton idle "gui/gui_1.png" xpos 0 ypos 0 action ShowMenu('save')
        imagebutton idle "gui/gui_2.png" xpos 1115 ypos 0 action ShowMenu('preferences')
        imagebutton idle "gui/gui_3.png" xpos 0 ypos 70 action Rollback()

init python:
    config.overlay_screens.append("quick_menu")
This, as may be expected, does not work :oops:
Could you please elaborate indoneko?


Top
 Profile Send private message  
 
PostPosted: Mon Mar 20, 2017 9:27 pm 
Veteran
User avatar

Joined: Sat Sep 03, 2016 4:00 am
Posts: 408
There's a mistake in your code. Instead of :
showif persistent.showquickmenu = True:

It should be :
showif persistent.showquickmenu:

Btw, why do you need to use persistent variable?

_________________
My avatar is courtesy of Mellanthe


Top
 Profile Send private message  
 
PostPosted: Mon Mar 20, 2017 9:37 pm 
Regular
User avatar

Joined: Sat Mar 18, 2017 3:27 pm
Posts: 31
Thanks a lot indoneko, now it works indeed.

That is a very clear and concise way of showing and hiding the quick menu, by making use of "showif". I did not know the command.

And indeed, there is no need for a persistent variable. It works both ways, but I've removed the "persistent." bit.

Thanks ever so much (^_^)


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Protected by Anti-Spam ACP
Powered by phpBB® Forum Software © phpBB Group