Page 1 of 1

"Show Text" problem

Posted: Tue Oct 17, 2017 2:10 am
by Amie
Hello everyone! OK, so in the intro to my game I'm using the 'show text' command for the prologue, as seen below:

Code: Select all

show text "This is the introduction to my probably terrible game, blah blah blah...." at truecenter
with dissolve
pause 4
hide text
with dissolve
    
show text "Another line of introduction, blah blah blah, etc...." at truecenter
with dissolve
pause 4
hide text
with dissolve
    
show text "This is the last line of introduction text, blah blah blah...." at truecenter
with dissolve
pause 4
hide text
with dissolve
The problem I'm having is that if the user clicks at any time, it will skip all three lines of dialogue. Is there a way to make it so that you click and it only skips the line you're on, and then shows the next line?

Thanks for any help! :)

Re: "Show Text" problem

Posted: Tue Oct 17, 2017 4:10 am
by Imperf3kt

Re: "Show Text" problem

Posted: Tue Oct 17, 2017 8:34 pm
by Donmai
I tried your script and the problem persisted even when I used hard pauses or added a scene statement before each line (I'm not saying your script is bad, it's only that I'm not that good at scripting myself :wink: ).
Well, there are several ways of scripting that kind of game introduction. If you don't mind losing the dissolve effect, you can simply use the "centered" character and some text tags for pausing and formatting (this will work better if you give default preferences.text_cps a value greater than zero:

Code: Select all

    scene black
    centered "This is the introduction to your certainly lovely game, blah blah blah....{p=4.0} \n\nAnother line of introduction, blah blah blah, etc....{p=4.0} \n\nThis is the last line of introduction text, blah blah blah...."
Or, if you want something really eye-catching, you could try this code by Kinsman: viewtopic.php?p=269905#p269905

Re: "Show Text" problem

Posted: Tue Oct 17, 2017 9:11 pm
by etoir
Yes. You can replace

Code: Select all

pause 4
with

Code: Select all

$ renpy.pause(4, hard=True)

Re: "Show Text" problem

Posted: Wed Oct 18, 2017 4:42 am
by Imperf3kt
Works for me when I use this code from an on-hold game.

Code: Select all

label prologue:
# My start button starts here instead of label start
    
    $ save_name = "Prologue"
    
    scene menuscreen
    with dissolve
    $ renpy.pause (1, hard=True)
    stop music fadeout 2.0
    show text ".:Please be aware that the following is in development and should not be viewed as the final product:."
    with dissolve
    $ renpy.pause(5, hard=True)
    scene blk with dissolve
Here's a video example of what this does:
https://puu.sh/y0YE3/49ca8573fb.mp4

Note that I am clicking during the video and also pressing spacebar.

Now, if you wanted to make it so the dissolve cannot be skipped, you would do this instead:

Code: Select all

label prologue:
    
    $ save_name = "Prologue"
    
    scene menuscreen
    with dissolve
    $ renpy.pause (1, hard=True)
    stop music fadeout 2.0
    show text ".:Please be aware that the following is in development and should not be viewed as the final product:." with dissolve
    $ renpy.pause(5, hard=True)
    scene blk with dissolve
    $ renpy.pause(0.5, hard=True)

You can just duplicate this to add several groups of wording as you like, such as in the following example: (from yet another, on-hold game > not my fault)

Code: Select all

# Splashscreen (Pre-game Loading Screen)
label splashscreen:
    scene black
#    with Pause(2)
#    play music "music/splash.wav" fadein 1.15
    
    show logo:
        xalign 0.5
        yalign 0.25
        
    show text "Atomic Mutant Attacks!!!\nA comic by Studio Lizard Graphics":
        ypos 0.65
    with dissolve
    $ renpy.pause(3, hard=True)
    
    scene black
    with dissolve
    $ renpy.pause(0.5, hard=True)
    
    show text "Work In Progress\nPlease be patient, more work is underway!"
    $ renpy.pause(3, hard=True)
    with dissolve
    
    scene black
    with dissolve
    $ renpy.pause(0.5, hard=True)
#    stop music fadeout 5
    
    show text "Music by Kevin Macleod (http://incompetech.com/)\nLicensed under Creative Commons: By attribution 3.0 License\nhttp://creativecommons.org/licenses/by/3.0\nMade with Ren'Py http://www.renpy.org/"
    $ renpy.pause(3, hard=True)
    
    return

# Game start
label start:
Which'll give you this (again, I am clicking throughout this):
https://puu.sh/y0YYp/fb4ab06d0e.mp4

Re: "Show Text" problem

Posted: Thu Oct 19, 2017 10:52 am
by Amie
Thanks so much to all of you for all your help! I've managed to get pretty much the effect I was looking for now, thanks again everyone! :D