[SOLVED] Disable skip for first playthrough, remove restriction in next playthrough

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
nerupuff
Veteran
Posts: 211
Joined: Sat Dec 02, 2017 2:24 am
Contact:

[SOLVED] Disable skip for first playthrough, remove restriction in next playthrough

#1 Post by nerupuff »

Hello!

The common route I'm making for a game will have a scene that acts as though the character is becoming drowsy and losing touch with reality, so the text will have a CPS of slower than the default CPS. I will apply a disable skip feature on that scene only, so I'll be using this reference: LSF Link

However, I don't want it to become unskippable forever! That will be a drag since the game may have more endings , and I don't want to have players to go through this montage all the time.

How do I activate this non-skip function for the first playthrough, but then disable it for when the player finishes 1 end and moves to replay from the start?
Last edited by nerupuff on Sat Dec 29, 2018 12:01 pm, edited 1 time in total.
ImageImage
Hire me for proofreading, editing, and (maybe) writing! ♡ Check here!

User avatar
mitoky
Veteran
Posts: 316
Joined: Sat Feb 07, 2015 9:12 pm
Projects: The Purring Demon's Love, circus eterie
Contact:

Re: [HELP] Disable skip for first playthrough, remove restriction in next playthrough

#2 Post by mitoky »

Just make another flag and check for it.

Code: Select all

default persistent.skipthis = False
and then before the scene:

Code: Select all

if not persistent.skipthis:
    $ _skipping = False
and after the scene:

Code: Select all

if not persistent.skipthis:
    $ _skipping = True
Once you cross the point in-game where the skipping should work normally afterwards, just turn the variable True and the skipping stopping will be inored from then on:

Code: Select all

$ persistent.skipthis = True

User avatar
nerupuff
Veteran
Posts: 211
Joined: Sat Dec 02, 2017 2:24 am
Contact:

Re: [HELP] Disable skip for first playthrough, remove restriction in next playthrough

#3 Post by nerupuff »

Thank you for the fast response, mitoky! I appreciate it. I'll be trying this out and I'll mark this solved once I manage to get it to work. ^^
ImageImage
Hire me for proofreading, editing, and (maybe) writing! ♡ Check here!

Post Reply

Who is online

Users browsing this forum: Google [Bot], Stampaw