Block continue or click
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.
Block continue or click
How do you make it so throughout a certain portion of the code, the player cannot click or skip what is currently going on? I'm trying to make it so a certain part of the scene happens and match it up right with the music; But it won't flow right if the player skips through this portion, or opens the menue? How do i make it so that can't happen?
- nyaatrap
- Crawling Chaos
- Posts: 1824
- Joined: Mon Feb 13, 2012 5:37 am
- Location: Kimashi Tower, Japan
- Contact:
Re: Block continue or click
Code: Select all
$config.skipping = None
$config.rollback_enabled = False
$_game_menu_screen = None
#block of scene codes here
$renpy.pause(time, hard=True)
Re: Block continue or click
Ah, ok. So say i have a sequence of things i want to happen, i put that before it, and when i want to give the player the ability to click and play again, i put that same code, but set them to true?
(kinda new to this)
(kinda new to this)
- Gear
- Miko-Class Veteran
- Posts: 764
- Joined: Tue Apr 05, 2011 10:15 pm
- Projects: Tempestus Sum
- Organization: Xenokos Interactive
- IRC Nick: Gear
- Skype: Skye.Gear
- Location: Grand Prairie, TX
- Contact:
Re: Block continue or click
I tried the code, but it didn't work for me; I didn't get any errors, but my sequence could still be interrupted by a mouse click. Adding the pause at the end only seems to make a hard pause you can't click past AFTER the section you're trying to make uninterruptible, unless I'm doing something wrong here.
The best reason to get up in the morning is to outdo yourself: to do it better than you've ever done it before. But if you haven't done it better by nightfall... look at your globe and pick a spot: it's always morning somewhere.
- nyaatrap
- Crawling Chaos
- Posts: 1824
- Joined: Mon Feb 13, 2012 5:37 am
- Location: Kimashi Tower, Japan
- Contact:
Re: Block continue or click
Code: Select all
config.rollback_enabled = True
_game_menu_screen = "save_screen"
Also, you can't use say dialogues. If you need to show text, you need to use text displayables instead.
To do a complete auto advance requires several advanced knowledge on ren'py.
- nyaatrap
- Crawling Chaos
- Posts: 1824
- Joined: Mon Feb 13, 2012 5:37 am
- Location: Kimashi Tower, Japan
- Contact:
Re: Block continue or click
Lol I find a way to disable leftclick on say dialogue:
I don't know if there is some side effect
Code: Select all
screen disable_leftclick:
key "mousedown_1" action With(None)
Code: Select all
label ending:
show screen disble_leftclick
"auto message{w=3}{nw}"
Re: Block continue or click
Hmm..this doesn't seem to be doing what i'm trying to do; the first code didn't work for me either.
Is there a way i could just simply disable any input whatsoever and then enable it again later in the script?
Sorry for the bouncing back and forth.
Is there a way i could just simply disable any input whatsoever and then enable it again later in the script?
Sorry for the bouncing back and forth.
-
- Veteran
- Posts: 479
- Joined: Tue Jun 05, 2012 2:01 am
- Contact:
Re: Block continue or click
The way Ren'Py works, there isn't really any global switch to turn off keyboard/mouse processing.
The way to suppress processing of all keyboard/mouse input for a specific message is something like this:
(This is similar to the first suggestion, but a bit more thorough, and hopefully a bit more clear.)
I wouldn't recommend it unless it's truly necessary, though: disabling access to menus etc. is really annoying for users.
The way to suppress processing of all keyboard/mouse input for a specific message is something like this:
Code: Select all
$ narrator("You can't get rid of this message!", interact=False)
$ ui.pausebehavior(5)
$ ui.interact(suppress_overlay = True, suppress_underlay = True)
I wouldn't recommend it unless it's truly necessary, though: disabling access to menus etc. is really annoying for users.
- nyaatrap
- Crawling Chaos
- Posts: 1824
- Joined: Mon Feb 13, 2012 5:37 am
- Location: Kimashi Tower, Japan
- Contact:
Re: Block continue or click
I like ren'py doesn't provide an easy way to stop interacts. People always use it in a frustrated way and its result is just annoy players. I only block it to execute high speed animation correctly.
Re: Block continue or click
Hmm, i see. Is pause behavior the only type of code that can prevent keyboard/mouse input?
If so, how would you implement it for a scripted sequence?
The thing is, with a hard pause like that, it stops any progress for images, transitions, or any type of code to progress; when the goal is to allow the code to progress, but disable the user from skipping or interrupting it until a specified point in the script.
I apologize if i'm being redundant and stubborn, but is there really no way around this? I see things like this happen in VNs all the time; it just seems like a simple thing to do.
I understand that this might be annoying for users to not be able to skip, but is that a reason to have the player miss out on an experience you, the developer, want them to experience? It only happens once in the entire VN, so its not something i plan to be continuous.
If so, how would you implement it for a scripted sequence?
The thing is, with a hard pause like that, it stops any progress for images, transitions, or any type of code to progress; when the goal is to allow the code to progress, but disable the user from skipping or interrupting it until a specified point in the script.
I apologize if i'm being redundant and stubborn, but is there really no way around this? I see things like this happen in VNs all the time; it just seems like a simple thing to do.
I understand that this might be annoying for users to not be able to skip, but is that a reason to have the player miss out on an experience you, the developer, want them to experience? It only happens once in the entire VN, so its not something i plan to be continuous.
-
- Veteran
- Posts: 479
- Joined: Tue Jun 05, 2012 2:01 am
- Contact:
Re: Block continue or click
You can implement complex scripted sequence using ATL: http://www.renpy.org/doc/html/atl.html .
Re: Block continue or click
I see...thanks for the the help. It doesn't solve my problem, but i'll see if i can work around it.