[Solved] How to disable user input during a pause?

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
Psieye
Newbie
Posts: 6
Joined: Thu Jan 01, 2015 2:21 pm
Contact:

[Solved] How to disable user input during a pause?

#1 Post by Psieye »

For example, suppose the following source code:

Code: Select all

show myCharacter:
    xalign 0.9 yalign 0.5
    linear 1.0 xalign 0.5
pause 1

"Begin narration"
If the user clicks during that pause, the default Ren'Py behaviour is to cancel the pause (sometimes pre-maturely stopping the animation) and immediately display "begin narration". Is there a way to force the user to wait for the whole pause before "begin narration" shows?
Last edited by Psieye on Sun Sep 04, 2016 12:45 pm, edited 1 time in total.

User avatar
papiersam
Veteran
Posts: 231
Joined: Fri Aug 12, 2016 2:24 pm
Completed: Gem Hunt Beta, 1/Probably, Animunch
Projects: The Panda Who Dreamed
Contact:

Re: How to disable user input during a pause?

#2 Post by papiersam »


User avatar
Psieye
Newbie
Posts: 6
Joined: Thu Jan 01, 2015 2:21 pm
Contact:

Re: How to disable user input during a pause?

#3 Post by Psieye »

Ah thank you, that was the specific term to search for.

Just to wrap this thread up, here's how I made hard pausing a user-toggleable preference:

Define variable:

Code: Select all

init python:
    hardPause = True
Use hard pause in script:

Code: Select all

    $ renpy.pause(1.5, hard=hardPause)
Make option box in Preferences screen (screens.rpy):

Code: Select all

frame:
    style_group "pref"
    has vbox

    label _("Use Hard Pause") #use a better name for users
    textbutton _("True"):
        action [SetVariable("hardPause", True)]
    textbutton _("False"):
        action [SetVariable("hardPause", False)]

Post Reply

Who is online

Users browsing this forum: alyoshaslab