Displaying a Line of Text for a set time before progressing

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
Bampton
Newbie
Posts: 5
Joined: Mon Feb 24, 2014 12:47 pm
Contact:

Displaying a Line of Text for a set time before progressing

#1 Post by Bampton »

Hi, sorry for the ultra basic question, but I have been combing through the documentation and can't seem to find how to do this. I am sure it must be something really simple and I'm just using the wrong terms!

I basically just want a line of text to display for say, 5 seconds, before the game progresses automatically.

Thanks!

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: Displaying a Line of Text for a set time before progress

#2 Post by Donmai »

You will want this part of the documentation: http://www.renpy.org/doc/html/text.html#text
Maybe you are after the {w} tag. For example:

Code: Select all

"Sentence 1{w} Sentence 2"
Sentence 1 will be shown and Ren'Py will wait for a mouse click before showing Sentence 2.

Code: Select all

"Sentence 1{w=5.0} Sentence 2"
Sentence 1 will be shown and Ren'Py will wait five seconds before automatically showing Sentence 2.

If your text is a title, and not a dialogue, you can use pause.
http://www.renpy.org/wiki/renpy/doc/ref ... enpy.pause
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

Bampton
Newbie
Posts: 5
Joined: Mon Feb 24, 2014 12:47 pm
Contact:

Re: Displaying a Line of Text for a set time before progress

#3 Post by Bampton »

Thanks, but that's not quite what I'm trying to do! That will be useful though…

I'm basically trying to make a sort of slideshow that generates random stuff, displays it for a short time, then re randomises and starts again, looping around forever. It's an art installation thing. So I have my random variables set up, then I have them displayed with this line -

Code: Select all

" Number [counter] - [fname] [mname] [sname] \n * [varyone] [varytwo]. \n * [varythree]"
and then I want the line to go away like if the player clicked, but without a click. I think I just need the auto-advance-mode, but I am damned if I can find out how to actually turn it on! There's an option to change the speed of it in the preferences menu even, but I cannot see how to actually get it to, well, auto advance to begin with.

Thanks again!

EDIT - ARG, I am so dumb, it is right there on the screen in the main game. XD I still can't find out how to set auto-advance-mode to be on by default though?

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

Re: Displaying a Line of Text for a set time before progress

#4 Post by Asceai »

Bampton wrote:Thanks, but that's not quite what I'm trying to do! That will be useful though…

I'm basically trying to make a sort of slideshow that generates random stuff, displays it for a short time, then re randomises and starts again, looping around forever. It's an art installation thing. So I have my random variables set up, then I have them displayed with this line -

Code: Select all

" Number [counter] - [fname] [mname] [sname] \n * [varyone] [varytwo]. \n * [varythree]"
and then I want the line to go away like if the player clicked, but without a click. I think I just need the auto-advance-mode, but I am damned if I can find out how to actually turn it on! There's an option to change the speed of it in the preferences menu even, but I cannot see how to actually get it to, well, auto advance to begin with.

Thanks again!

EDIT - ARG, I am so dumb, it is right there on the screen in the main game. XD I still can't find out how to set auto-advance-mode to be on by default though?
config.default_afm_enable = True

User avatar
soggybottoms
Regular
Posts: 35
Joined: Fri May 09, 2014 12:52 am
Contact:

Re: Displaying a Line of Text for a set time before progress

#5 Post by soggybottoms »

Bampton wrote:EDIT - ARG, I am so dumb, it is right there on the screen in the main game. XD I still can't find out how to set auto-advance-mode to be on by default though?
I am looking everywhere trying to figure out exactly how to do this and have no idea what super obvious thing you saw that you're referring to here. XD Can you spell it out?? I've read how to make it do this on default for the whole game, but I only want to implement it on a line-by-line basis as needed.

User avatar
xavimat
Eileen-Class Veteran
Posts: 1461
Joined: Sat Feb 25, 2012 8:45 pm
Completed: Yeshua, Jesus Life, Cops&Robbers
Projects: Fear&Love
Organization: Pilgrim Creations
Github: xavi-mat
itch: pilgrimcreations
Location: Spain
Discord: xavimat
Contact:

Re: Displaying a Line of Text for a set time before progress

#6 Post by xavimat »

Comunidad Ren'Py en español: ¡Únete a nuestro Discord!
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)

User avatar
soggybottoms
Regular
Posts: 35
Joined: Fri May 09, 2014 12:52 am
Contact:

Re: Displaying a Line of Text for a set time before progress

#7 Post by soggybottoms »

That was making the line disappear as soon as it appeared since I don't have slow-type on. But I figured it out! n_n Gotta put an amount of time to wait (same way you put a pause between two strings in the same line when you want a pausing effect) followed by the {nw} tag. That does the trick. :D

Post Reply

Who is online

Users browsing this forum: Google [Bot]