Teprarily disable CTC without 'pause' function?

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
lking22
Regular
Posts: 50
Joined: Sun Dec 03, 2017 3:33 am
Projects: Grey Feather
itch: freefall-games
Contact:

Teprarily disable CTC without 'pause' function?

#1 Post by lking22 »

Basically, I'm trying to make it so that the player can explore a character's room using links in a paragraph of text. So far I have this:

Code: Select all

label roomdesc:
    nvl clear
    nvl_narrator "My room is small, but I like it that way. It makes it easy to reach everything quickly. My {a=jump:dreambed}bed{/a} is pushed up in the
                  corner, neatly made, with my {a=jump:dreamcloset}closet{/a} at the foot of it. My {a=jump:dreamshelf}bookshelf{/a} is on the opposite side of
                  the room, right next to the {a=jump:dreamdoor}door{/a}."
return
The only problem I'm having now is how to make it so that the player can't just click past this dialogue, and instead has to click on one of the links to continue.
Releases:
Image

Current projects:
In the Ashes of Dawn
Split Psyche
Savestate Gambit

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

Re: Teprarily disable CTC without 'pause' function?

#2 Post by Imperf3kt »

I can think of two ways.

One is to replace it with a screen that is modal. This would involve a reasonable amount of work but the result should be pretty much what you want.

A better way, might be to simply put a label right before this line of dialogue. The line after is a jump back to the new label you just created.
By clicking one of the links, you can break out of the loop.
One caveat is that if you have the text appear slower than instantly, clicking will make it seem as if the same line is repeating over and over.
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
lking22
Regular
Posts: 50
Joined: Sun Dec 03, 2017 3:33 am
Projects: Grey Feather
itch: freefall-games
Contact:

Re: Teprarily disable CTC without 'pause' function?

#3 Post by lking22 »

Thank you, that solves it! I'm going to go with the second option.
Releases:
Image

Current projects:
In the Ashes of Dawn
Split Psyche
Savestate Gambit

User avatar
Ocelot
Lemma-Class Veteran
Posts: 2401
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: Teprarily disable CTC without 'pause' function?

#4 Post by Ocelot »

I belerve the easiest way is to use "say with attributes" ( https://www.renpy.org/doc/html/dialogue ... -arguments ) and write

Code: Select all

nvl_narrator "My room is small, but I like it that way. It makes it easy to reach everything quickly. My {a=jump:dreambed}bed{/a} is pushed up in the
                  corner, neatly made, with my {a=jump:dreamcloset}closet{/a} at the foot of it. My {a=jump:dreamshelf}bookshelf{/a} is on the opposite side of
                  the room, right next to the {a=jump:dreamdoor}door{/a}." (advance=False)
advance parameter exist exactly for this situation:
advance
If True, the default, the player can click to advance through the statement, and other means of advancing (such as skip and auto-forward mode) will also work. If False, the player will be unable to move past the say statement unless an alternate means (such as a jump hyperlink or screen) is provided.
< < insert Rick Cook quote here > >

Post Reply

Who is online

Users browsing this forum: Andredron