Disable skipping for a scene, with skip all button

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
sarbezleeb
Regular
Posts: 50
Joined: Sun Nov 13, 2016 5:42 am
Tumblr: tunasandwichofdestiny
Skype: sarbezleeb
Soundcloud: charclo
Contact:

Disable skipping for a scene, with skip all button

#1 Post by sarbezleeb »

I'd like for the opening sequence of the game to be unskippable, meaning the images and text automatically scroll by at a pace that i've already set. I want to disable skipping the text by pressing space or clicking or anything. This should be relatively straightforward with a line of code that i've come across here:

Code: Select all

config.allow_skipping = False
I put this line in the options.rpy file, under the "#More customizations can go here" line, but it doesn't seem to work, I can still skip text at my own speed. I'd also like to have only label section of the game unskippable, so I'd rather put it somewhere in the script.rpy file rather than apply it to the whole game.
I've also come across another solution, which disables clicking while an animation takes place.

Code: Select all

label start:
    python:
        ui.vbox(xalign=.5, yalign=.5)
        ui.image(Animation("swords.png", 0.25,
                                "guy2.png", 0.25,
                                "whatever_other_picture_you_want_to_use.png", 0.25,
                                "transparent.png",200000000))
        ui.close()
        ui.pausebehavior( 30, result="Skip") 
        ui.interact()
however, my cutscene has a mixture of images and text with a variety of formatting on them, which I can't seem to imbed into this command.

Any adjustments to either of these options (or another option) would be greatly appreciated.

jw2pfd
Regular
Posts: 87
Joined: Tue Sep 18, 2012 9:55 pm
Location: DFW, TX, USA
Contact:

Re: Disable skipping for a scene, with skip all button

#2 Post by jw2pfd »

I am not sure if this will suit your exact purposes or not, but a hard pause may work for what you need. https://www.renpy.org/doc/html/other.html#renpy.pause

Code: Select all

    $ renpy.pause(5.0, hard=True)   #replace 5.0 with whatever time you actually need
The hard flag being set to True makes it so users can't click to go past the pause.

sarbezleeb
Regular
Posts: 50
Joined: Sun Nov 13, 2016 5:42 am
Tumblr: tunasandwichofdestiny
Skype: sarbezleeb
Soundcloud: charclo
Contact:

Re: Disable skipping for a scene, with skip all button

#3 Post by sarbezleeb »

Unfortunately this won't work for me, as I need to have text and images go by the entire time, and the player will still be able to click through the text as it scrolls.

Surely there's a way for "config.allow_skipping = False" to work? If it's on the Ren'py website it should be able to work.

philat
Eileen-Class Veteran
Posts: 1912
Joined: Wed Dec 04, 2013 12:33 pm
Contact:

Re: Disable skipping for a scene, with skip all button

#4 Post by philat »

The top of the page you link to explicitly states that Ren'py assumes configuration variables will not be changed after initialization.

https://www.renpy.org/doc/html/store_va ... -_skipping

sarbezleeb
Regular
Posts: 50
Joined: Sun Nov 13, 2016 5:42 am
Tumblr: tunasandwichofdestiny
Skype: sarbezleeb
Soundcloud: charclo
Contact:

Re: Disable skipping for a scene, with skip all button

#5 Post by sarbezleeb »

Right, so is there any way for me to change this sort of variable halfway through the game? Would I have to call on another script for this to work? Please be as explicit as possible as im not very experience with Ren'py.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Majestic-12 [Bot]