[SOLVED] How to change where right click leads?

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
M0ti
Regular
Posts: 66
Joined: Mon Aug 15, 2011 1:06 pm
Contact:

[SOLVED] How to change where right click leads?

#1 Post by M0ti » Wed Jan 06, 2016 6:09 pm

Hi, I'm making hybrid VN/RPG for my friend for his birthday. I want it to look as typical RPG so I want to disable saving in battles.
An hour ago I have learned action SensitiveIf(expression) by which I made save buttons insensitive. The problem is right click and esc button. They start game_menu which is as default save screen as I read. This bypass those insensitive buttons and makes my effort pointless.
I have made additional screen with game stats. It will be perfect if it led there instead of save screen. The question is how?
Last edited by M0ti on Wed Jan 06, 2016 8:16 pm, edited 1 time in total.

User avatar
PyTom
Ren'Py Creator
Posts: 15893
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: How to change where right click leads?

#2 Post by PyTom » Wed Jan 06, 2016 6:50 pm

Set _game_menu_screen to where you want it to go. For example,

Code: Select all

$ _game_menu_screen = "stats"
[code]
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: How to change where right click leads?

#3 Post by xela » Wed Jan 06, 2016 7:01 pm

PyTom wrote:Set _game_menu_screen to where you want it to go. For example,

Code: Select all

$ _game_menu_screen = "stats"
Would that not change it for the whole game, both VN and RPG parts?

Another option is to create a screen just with the key statement overriding the default for menu (Showing/hiding stats screen instead) and show it during RPG battles. I always do it this way and it hasn't failed (yet).
Like what we're doing? Support us at:
Image

User avatar
M0ti
Regular
Posts: 66
Joined: Mon Aug 15, 2011 1:06 pm
Contact:

Re: How to change where right click leads?

#4 Post by M0ti » Wed Jan 06, 2016 8:15 pm

Code: Select all

$ _game_menu_screen = "stats"
It's amazing how solutions of my problems are always so simple. Ren'py is incredible in this.
The other solution sounds awesome too but for my level it's too much and what PyTom suggested is exactly what I was looking for. This stat screen includes navigation which is part of so everything works and I can go sleep now. Thank you both

Post Reply

Who is online

Users browsing this forum: Bing [Bot]