"Show Text" problem

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
Amie
Regular
Posts: 28
Joined: Tue Jun 06, 2017 4:48 am
Contact:

"Show Text" problem

#1 Post 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! :)

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3784
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: "Show Text" problem

#2 Post by Imperf3kt »

Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

User avatar
Donmai
Eileen-Class Veteran
Posts: 1958
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: "Show Text" problem

#3 Post 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
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

etoir
Newbie
Posts: 3
Joined: Wed Sep 27, 2017 11:40 am
itch: etoir
Contact:

Re: "Show Text" problem

#4 Post by etoir »

Yes. You can replace

Code: Select all

pause 4
with

Code: Select all

$ renpy.pause(4, hard=True)

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3784
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: "Show Text" problem

#5 Post 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
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

User avatar
Amie
Regular
Posts: 28
Joined: Tue Jun 06, 2017 4:48 am
Contact:

Re: "Show Text" problem

#6 Post 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

Post Reply

Who is online

Users browsing this forum: No registered users