Toggle Skip Mode from Python Call [Resolved]

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
Jackkel Dragon
Veteran
Posts: 283
Joined: Mon Mar 31, 2014 7:17 pm
Organization: Nightshade, Team Despair
itch: jackkel-dragon
Location: USA
Contact:

Toggle Skip Mode from Python Call [Resolved]

#1 Post by Jackkel Dragon »

I'm attempting to more-or-less disable skipping during a credits sequence in my game, but I'm having a hard time with making it all work properly. So far I've been using this code before the credits begin:

Code: Select all

$ _skipping = False
$ _dismiss_pause = False
This is doing a good job at preventing the player from starting skip mode during the credits or accidentally skipping them entirely with one click. However, it doesn't solve my main problem, which is when skipping is turned on when the credits begin. If skipping is toggled on when the credits start, the credits skip instantly despite the above code. As far as I can tell, the code I'm using only prevents a player from entering skip mode, it doesn't exit skip mode if it's already on.

Therefore, my main question is if there is a way to toggle the current skip mode from a python command, like "renpy.get_skipping" does for finding the current value. A side question would be if there is a better way to handle this. I don't necessarily want to lock players into the credits sequence, but I don't want someone holding down control to simply never see the credits, either.
Last edited by Jackkel Dragon on Tue Oct 09, 2018 4:30 pm, edited 1 time in total.
Main Website
Includes information about and links to many of my current and past projects.

Major Game Projects
[Nightshade] Eldritch Academy, Eldritch University, Blooming Nightshade, Flowering Nightshade, Life as Designed
[Team Despair] Corpse Party D2 series

User avatar
Remix
Eileen-Class Veteran
Posts: 1628
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

Re: Toggle Skip Mode from Python Call

#2 Post by Remix »

$ config.skipping = None
$ config.allow_skipping = False
...
Credits
...
$ config.allow_skipping = True

Maybe. (untested)
Frameworks & Scriptlets:

User avatar
Jackkel Dragon
Veteran
Posts: 283
Joined: Mon Mar 31, 2014 7:17 pm
Organization: Nightshade, Team Despair
itch: jackkel-dragon
Location: USA
Contact:

Re: Toggle Skip Mode from Python Call

#3 Post by Jackkel Dragon »

Had to mess around with them a bit, but that code plus my existing code seems to work. One can still skip the credits by pressing tab (toggle skip mode) after the credits start in my current build, but my original problem (skipping the credits by accident) is fixed. Since clicking and the control button no longer break the credits, I think letting tab be used to skip them intentionally should be fine.

Edit: As a side note, the re-enabling of skip after the credits is important. Not doing so requires the player to re-start the game in order to be able to skip again, even if they load a saved game.
Main Website
Includes information about and links to many of my current and past projects.

Major Game Projects
[Nightshade] Eldritch Academy, Eldritch University, Blooming Nightshade, Flowering Nightshade, Life as Designed
[Team Despair] Corpse Party D2 series

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]