Disable skipping for a set amount of time? [Solved]

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
Cherrylin
Newbie
Posts: 7
Joined: Mon Apr 14, 2014 7:35 am
Contact:

Disable skipping for a set amount of time? [Solved]

#1 Post by Cherrylin »

Hello everyone!

I've been looking around for a solution for this problem, and frankly, none to be found. All issues that were slightly similar doesn't seem to be anything I can stuff on my particular issue, so I thought of asking here myself.

I have a part of text that shows with a bit of transition and all, but this is perfectly skippable as it is now, and I don't want that. The reader should not be able to skip this at all. I tried using

Code: Select all

$ renpy.pause(0.5, hard='True')
- and while that does disable the person from clicking through it, it does kill the transition effects apparently...

What I'm looking for, or at least think I'm looking for is either;

A: A line that disables clicking (or advancing through clicking) until another line enables this again.
B: A line that disables clicking (or advancing through clicking) during a set amount of time, but the text will auto-advance as it should.
Last edited by Cherrylin on Wed Apr 16, 2014 3:11 am, edited 1 time in total.

User avatar
Donmai
Eileen-Class Veteran
Posts: 1960
Joined: Sun Jun 10, 2012 1:45 am
Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
Projects: Slumberland
Location: Brazil
Contact:

Re: Disable skipping during part/for a set amount of time?

#2 Post by Donmai »

What transition are you using? Many transitions can be safely subtituted by ATL transforms that interact better with hard pauses.
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

Cherrylin
Newbie
Posts: 7
Joined: Mon Apr 14, 2014 7:35 am
Contact:

Re: Disable skipping during part/for a set amount of time?

#3 Post by Cherrylin »

Dissolve and Pause.

Basically, black screen, text fades in, stays there a bit, fades out.
I just have to disable the player from skipping that though. >w<;

Asceai
Eileen-Class Veteran
Posts: 1258
Joined: Fri Sep 21, 2007 7:13 am
Projects: a battle engine
Contact:

Re: Disable skipping during part/for a set amount of time?

#4 Post by Asceai »

Yep, that's quite easy to do with ATL.

Code: Select all

scene expression Solid("#000")
show expression Text("It was a dark and stormy night.", size=24) at truecenter:
    alpha 0.0
    linear 4.0 alpha 1.0
    pause 12.0
    linear 4.0 alpha 0.0
$ renpy.pause(20.0, hard=True)

User avatar
Taleweaver
Writing Maniac
Posts: 3428
Joined: Tue Nov 11, 2003 8:51 am
Completed: Metropolitan Blues, The Loyal Kinsman, Daemonophilia, The Dreaming, The Thirteenth Year, Adrift, Bionic Heart 2, Secrets of the Wolf, The Photographer
Projects: The Pilgrim's Path, Elspeth's Garden, Secret Adventure Game!
Organization: Tall Tales Productions
Location: Germany
Contact:

Re: Disable skipping during part/for a set amount of time?

#5 Post by Taleweaver »

Ren'Py questions go into the Ren'Py Questions forum.

Moving.
Scriptwriter and producer of Metropolitan Blues
Creator of The Loyal Kinsman
Scriptwriter and director of Daemonophilia
Scriptwriter and director of The Dreaming
Scriptwriter of Zenith Chronicles
Scriptwriter and director of The Thirteenth Year
Scriptwriter and director of Romance is Dead
Scriptwriter and producer of Adrift
More about me in my blog
"Adrift - Like Ever17, but without the Deus Ex Machina" - HigurashiKira

Cherrylin
Newbie
Posts: 7
Joined: Mon Apr 14, 2014 7:35 am
Contact:

Re: Disable skipping during part/for a set amount of time?

#6 Post by Cherrylin »

@Taleweaver; Oh, sorry about that!! Thanks for moving it! :3

@Asceai; Thanks! It works for one line, however, if I try to do multiple lines, they show up at the same time (which is not what they should do). I tried a few different ways but they all give the same result.

Code: Select all

 scene expression Solid("#000")
    show expression Text("It was a dark and stormy night.", size=24) at truecenter:
        alpha 0.0
        linear 2.0 alpha 1.0
        pause 2.0
        linear 2.0 alpha 0.0
    
    show expression Text("And all the cookies were eaten.", size=24) at truecenter:
        alpha 0.0
        linear 2.0 alpha 1.0
        pause 2.0
        linear 2.0 alpha 0.0
    $ renpy.pause(6.0, hard=True)

Code: Select all

 scene expression Solid("#000")
    show expression Text("It was a dark and stormy night.", size=24) at truecenter:
        alpha 0.0
        linear 2.0 alpha 1.0
        pause 2.0
        linear 2.0 alpha 0.0
    $ renpy.pause(3.0, hard=True)
    
    show expression Text("And all the cookies were eaten.", size=24) at truecenter:
        alpha 0.0
        linear 2.0 alpha 1.0
        pause 2.0
        linear 2.0 alpha 0.0
    $ renpy.pause(3.0, hard=True)

Code: Select all

 scene expression Solid("#000")
    show expression Text("It was a dark and stormy night.", size=24) at truecenter:
        alpha 0.0
        linear 2.0 alpha 1.0
        pause 2.0
        linear 2.0 alpha 0.0
    $ renpy.pause(3.0, hard=True)
    
    scene expression Solid("#000")
    show expression Text("And all the cookies were eaten.", size=24) at truecenter:
        alpha 0.0
        linear 2.0 alpha 1.0
        pause 2.0
        linear 2.0 alpha 0.0
    $ renpy.pause(3.0, hard=True)
How can I get the text to change after the pause? Is there a way to "end" the expression?
I'm still new to Ren'Py ^^; So sorry if this is a pretty noobish question.

Edit Okay it seems I did find a bit of a solution, so now my question is more if there's a better solution... xD;;

Code: Select all

    scene expression Solid("#000")
    show expression Text("It was a dark and stormy night.", size=24) at truecenter:
        alpha 0.0
        linear 2.0 alpha 1.0
        pause 2.0
        linear 2.0 alpha 0.0
    $ renpy.pause(4.0, hard=True)
    with Pause(4.0)
    
    scene expression Solid("#000")
    show expression Text("And all the cookies were eaten.", size=24) at truecenter:
        alpha 0.0
        linear 2.0 alpha 1.0
        pause 2.0
        linear 2.0 alpha 0.0
    $ renpy.pause(4.0, hard=True)
    with Pause(4.0)

Asceai
Eileen-Class Veteran
Posts: 1258
Joined: Fri Sep 21, 2007 7:13 am
Projects: a battle engine
Contact:

Re: Disable skipping during part/for a set amount of time?

#7 Post by Asceai »

How can I get the text to change after the pause? Is there a way to "end" the expression?
I dunno what the best way of doing that is, but you could toss in a with None.

Code: Select all

    scene expression Solid("#000")
    show expression Text("It was a dark and stormy night.", size=24) at truecenter:
        alpha 0.0
        linear 2.0 alpha 1.0
        pause 2.0
        linear 2.0 alpha 0.0
    $ renpy.pause(6.0, hard=True)
    with None
    scene expression Solid("#000")
    show expression Text("And all the cookies were eaten.", size=24) at truecenter:
        alpha 0.0
        linear 2.0 alpha 1.0
        pause 2.0
        linear 2.0 alpha 0.0
    $ renpy.pause(6.0, hard=True)
    with None
EDIT: Oh, renpy.pause already has a mechanism for that. That must mean it's the right thing to do!

Code: Select all

    scene expression Solid("#000")
    show expression Text("It was a dark and stormy night.", size=24) at truecenter:
        alpha 0.0
        linear 2.0 alpha 1.0
        pause 2.0
        linear 2.0 alpha 0.0
    $ renpy.pause(6.0, hard=True, with_none=True)
    scene expression Solid("#000")
    show expression Text("And all the cookies were eaten.", size=24) at truecenter:
        alpha 0.0
        linear 2.0 alpha 1.0
        pause 2.0
        linear 2.0 alpha 0.0
    $ renpy.pause(6.0, hard=True, with_none=True)

Cherrylin
Newbie
Posts: 7
Joined: Mon Apr 14, 2014 7:35 am
Contact:

Re: Disable skipping during part/for a set amount of time?

#8 Post by Cherrylin »

Thank you, Asceai! It works perfectly! :3

Post Reply

Who is online

Users browsing this forum: Bing [Bot]