Allow skipping of dialogue containing wait tags

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
jepp21
Regular
Posts: 75
Joined: Fri Feb 10, 2023 3:46 pm
Contact:

Allow skipping of dialogue containing wait tags

#1 Post by jepp21 »

Hi all, I've been using wait text tags a lot mid-sentence to emulate punctuation.

Ex:

Code: Select all

an "Test,{w=0.25} test.{w=0.30} Test.{w=0.40}.. Test.{w=0.30} test.{w=0.30} test."
It works well, but I recently noticed if the player clicks to advance a line of dialogue, and there's a wait text tag in the middle of the line, it won't skip the entire line of dialogue and instead only skip up to the wait tag. Is there a way I can make it so it skips the entire line with 1 click?

I feel like it might be annoying if the player is trying to rush through dialogue but they have to spam click every time there's a period or comma in a line, but I dont want to get rid of using the wait tag because it's useful for emulating actual punctuation in dialogue.

User avatar
_ticlock_
Miko-Class Veteran
Posts: 910
Joined: Mon Oct 26, 2020 5:41 pm
Contact:

Re: Allow skipping of dialogue containing wait tags

#2 Post by _ticlock_ »

jepp21 wrote: Mon Sep 11, 2023 4:36 pm Hi all, I've been using wait text tags a lot mid-sentence to emulate punctuation.

Ex:

Code: Select all

an "Test,{w=0.25} test.{w=0.30} Test.{w=0.40}.. Test.{w=0.30} test.{w=0.30} test."
It works well, but I recently noticed if the player clicks to advance a line of dialogue, and there's a wait text tag in the middle of the line, it won't skip the entire line of dialogue and instead only skip up to the wait tag. Is there a way I can make it so it skips the entire line with 1 click?

I feel like it might be annoying if the player is trying to rush through dialogue but they have to spam click every time there's a period or comma in a line, but I dont want to get rid of using the wait tag because it's useful for emulating actual punctuation in dialogue.
As an alternative you can use cps tag that player can easily skip:

Code: Select all

an "Test,{cps=2} {/cps}test.{cps=2} {/cps}Test{cps=6}...{/cps} Test.{cps=2} {/cps}test.{cps=2} {/cps}test."
Also, to make it cleaner and shorter you can create a custom tag. For example:

Code: Select all

init python:
    def wt_tag(tag, argument):
        return [ ( renpy.TEXT_TAG, "cps=2"), (renpy.TEXT_TEXT, argument), (renpy.TEXT_TAG, "/cps") ]

    config.self_closing_custom_text_tags["wt"] = wt_tag

Code: Select all

an "Let me think{wt=...} Ok, let me try this. {wt= }It is done."

jepp21
Regular
Posts: 75
Joined: Fri Feb 10, 2023 3:46 pm
Contact:

Re: Allow skipping of dialogue containing wait tags

#3 Post by jepp21 »

_ticlock_ wrote: Tue Sep 12, 2023 10:24 am
jepp21 wrote: Mon Sep 11, 2023 4:36 pm Hi all, I've been using wait text tags a lot mid-sentence to emulate punctuation.

Ex:

Code: Select all

an "Test,{w=0.25} test.{w=0.30} Test.{w=0.40}.. Test.{w=0.30} test.{w=0.30} test."
It works well, but I recently noticed if the player clicks to advance a line of dialogue, and there's a wait text tag in the middle of the line, it won't skip the entire line of dialogue and instead only skip up to the wait tag. Is there a way I can make it so it skips the entire line with 1 click?

I feel like it might be annoying if the player is trying to rush through dialogue but they have to spam click every time there's a period or comma in a line, but I dont want to get rid of using the wait tag because it's useful for emulating actual punctuation in dialogue.
As an alternative you can use cps tag that player can easily skip:

Code: Select all

an "Test,{cps=2} {/cps}test.{cps=2} {/cps}Test{cps=6}...{/cps} Test.{cps=2} {/cps}test.{cps=2} {/cps}test."
Also, to make it cleaner and shorter you can create a custom tag. For example:

Code: Select all

init python:
    def wt_tag(tag, argument):
        return [ ( renpy.TEXT_TAG, "cps=2"), (renpy.TEXT_TEXT, argument), (renpy.TEXT_TAG, "/cps") ]

    config.self_closing_custom_text_tags["wt"] = wt_tag

Code: Select all

an "Let me think{wt=...} Ok, let me try this. {wt= }It is done."
Thanks. This works, but there's one problem. I use text beeps instead of voices, and using the wait tags makes the beeps stop when there's a pause. However, with the cps tag, there beeps playing during the pauses when no text is appearing on screen

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Ocelot