[solved] Manually stop skipping

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
menostorpe
Newbie
Posts: 15
Joined: Tue Jan 06, 2009 10:01 am
Contact:

[solved] Manually stop skipping

#1 Post by menostorpe »

I've been trying to search the documentation for a line that will stop skipping - that is, players who have clicked the "skip" button should always stop skipping at certain points regardless of if they've read the text before.

In case my reasoning is wrong, let me explain the issue. The game contains a loop while players are on a navigation screen, which includes "$ renpy.pause (hard=True)". Players who are skipping forward and hit this report either freezes or crashes. Testing suggests to me that the game is still skipping when it hits the loop, so I thought it best to make sure it always stops when the player reaches that point. Is there a simple way to do this?
Last edited by menostorpe on Wed Apr 05, 2017 3:47 pm, edited 1 time in total.

User avatar
Ocelot
Lemma-Class Veteran
Posts: 2446
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: Manually stop skipping

#2 Post by Ocelot »

You migh be interested in renpy.choice_for_skipping function:
Documentation wrote:Tells Ren'Py that a choice is coming up soon. This currently has two effects:
        If Ren'Py is skipping, and the Skip After Choices preferences is set to stop skipping, skipping is terminated.
        An auto-save is triggered.
< < insert Rick Cook quote here > >

menostorpe
Newbie
Posts: 15
Joined: Tue Jan 06, 2009 10:01 am
Contact:

Re: Manually stop skipping

#3 Post by menostorpe »

That seems like what I need, but I'm not sure what the actual syntax for using it is. I tried just putting it in verbatim and it didn't work. To be clear, I just pasted this in the appropriate place:

Code: Select all

renpy.choice_for_skipping()

User avatar
Ocelot
Lemma-Class Veteran
Posts: 2446
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: Manually stop skipping

#4 Post by Ocelot »

It is a PYthon fuction. So it needs to be in Python statement: https://www.renpy.org/doc/html/python.html
< < insert Rick Cook quote here > >

menostorpe
Newbie
Posts: 15
Joined: Tue Jan 06, 2009 10:01 am
Contact:

Re: Manually stop skipping

#5 Post by menostorpe »

Ah, that didn't occur to me. For anyone else reading, you just need to put it in a python block or as a one-line statement:

Code: Select all

$ renpy.choice_for_skipping()
Thanks for the help!

Post Reply

Who is online

Users browsing this forum: Baidu [Spider]