[solved] start and 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
User avatar
Kia
Eileen-Class Veteran
Posts: 1011
Joined: Fri Aug 01, 2014 7:49 am
Deviantart: KiaAzad
Discord: Kia#6810
Contact:

[solved] start and stop skipping

#1 Post by Kia » Sun Jan 31, 2021 2:31 pm

I'm trying to skip over a bunch of lines but I can't find the renpy code for start skipping

Code: Select all

$ skip(fast = True)
"Some dialogue 1"
"Some dialogue 2"
"Some dialogue 3"
"Some dialogue 4"
$ ui.pausebehavior(0)
"The game starts here but if you roll back, there are a bunch of dialogues"
I think I've seen something for this in the python equivalents page long ago but unfortunately my searches didn't yield any result
Last edited by Kia on Mon Feb 15, 2021 7:00 am, edited 1 time in total.

User avatar
Alex
Lemma-Class Veteran
Posts: 2981
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: start and stop skipping

#2 Post by Alex » Mon Feb 01, 2021 2:37 pm

Kia wrote:
Sun Jan 31, 2021 2:31 pm
...I think I've seen something for this in the python equivalents page long ago but unfortunately my searches didn't yield any result
This will skip lines if they were seen before

Code: Select all

label start:
    "..."
    $ config.skipping = True
    "1"
    "2"
    "3"
    "4"
    "5"
    "6"
    "7"
    $ config.skipping = False
    "?!"
Or, you can make a screen with timer that perform Return() action (simulates player clicks), show it when you like to start skipping and hide later...

User avatar
Kia
Eileen-Class Veteran
Posts: 1011
Joined: Fri Aug 01, 2014 7:49 am
Deviantart: KiaAzad
Discord: Kia#6810
Contact:

Re: start and stop skipping

#3 Post by Kia » Tue Feb 02, 2021 4:51 am

Thank you, it works pretty good, the only problem is: the skipping speed isn't instant and `$ config.skip_delay = 0` doesn't seem to have any effect. do you know of any solution?

User avatar
Alex
Lemma-Class Veteran
Posts: 2981
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: start and stop skipping

#4 Post by Alex » Tue Feb 02, 2021 1:00 pm

Kia wrote:
Tue Feb 02, 2021 4:51 am
... do you know of any solution?
I don't know... Kind of idea - to make a screen with timer, that will perform a Return() action (but I haven't tested it).

User avatar
Kia
Eileen-Class Veteran
Posts: 1011
Joined: Fri Aug 01, 2014 7:49 am
Deviantart: KiaAzad
Discord: Kia#6810
Contact:

Re: start and stop skipping

#5 Post by Kia » Fri Feb 05, 2021 3:10 am

I was hoping it's something simple that I've missed to not resort to using screens. Thank you Alex

strayerror
Regular
Posts: 154
Joined: Fri Jan 04, 2019 3:44 pm
Contact:

Re: start and stop skipping

#6 Post by strayerror » Fri Feb 05, 2021 3:26 am

Alex wrote:
Mon Feb 01, 2021 2:37 pm
This will skip lines if they were seen before

Code: Select all

label start:
    "..."
    $ config.skipping = True
    [...]
Alex was on the right track, but if I understand correctly, I think swapping out True for 'fast' will give you the behaviour you're looking for. i.e.

Code: Select all

    $ config.skipping = 'fast'
P.S. You may want to consider blocking rollback after turning on skipping, such that the player can't rollback far enough to again skip forward. ;)

strayerror
Regular
Posts: 154
Joined: Fri Jan 04, 2019 3:44 pm
Contact:

Re: start and stop skipping

#7 Post by strayerror » Fri Feb 05, 2021 3:48 am

So it turns out that in order to make this work the way I think you intend is a bit more complex.

Fast skipping is what you want, unfortunately however, that disables recording of rollback data, so rolling back also skips. Not ideal. All is not lost however, as it appears (from my very quick testing, so you probably want to be more thorough) that we can effectively forge the necessary rollback data when we know we're skipping - it's just not very pretty. There may be better ways of doing this, but this should at least get you closer. :)

Code: Select all

label start:
    "..."
    $ config.skipping = 'fast'
    $ renpy.block_rollback()
    "1"
    $ config.skipping == 'fast' and renpy.checkpoint(True)
    "2"
    $ config.skipping == 'fast' and renpy.checkpoint(True)
    "3"
    $ config.skipping == 'fast' and renpy.checkpoint(True)
    "4"
    $ config.skipping == 'fast' and renpy.checkpoint(True)
    "5"
    $ config.skipping == 'fast' and renpy.checkpoint(True)
    "6"
    $ config.skipping == 'fast' and renpy.checkpoint(True)
    "7"
    $ config.skipping == 'fast' and renpy.checkpoint(True)
    $ config.skipping = False
    "?!"
    return

User avatar
Kia
Eileen-Class Veteran
Posts: 1011
Joined: Fri Aug 01, 2014 7:49 am
Deviantart: KiaAzad
Discord: Kia#6810
Contact:

Re: start and stop skipping

#8 Post by Kia » Mon Feb 15, 2021 6:59 am

thank you strayerror, `$ config.skipping = 'fast'` is exactly what I was looking for.

Post Reply

Who is online

Users browsing this forum: Bing [Bot], span4ev