How to make timed text?

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
AHAKuo
Regular
Posts: 41
Joined: Tue Feb 06, 2018 11:10 am
Projects: SoUnd Is ToxIc
Organization: AHAKuo
Tumblr: ahakuo
Deviantart: ahakuo
Contact:

How to make timed text?

#1 Post by AHAKuo »

How can I make the "show text" command show the text and hide it after a certain amount of time?
Working on:

Image


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

Re: How to make timed text?

#3 Post by Imperf3kt »

That is a screen action, not what the OP is after.

Perhaps the Paragraph pause function has what you want?
https://www.renpy.org/doc/html/text.html?#text-tag-p
The paragraph pause tag is a self-closing tag that terminates the current paragraph, and waits for the user to click to continue. If it is given an argument, the argument is interpreted as a number, and the wait automatically ends after that many seconds have passed.

Code: Select all

"Line 1{p}Line 2{p=1.0}Line 3"
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
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: How to make timed text?

#4 Post by trooper6 »

You could just use renpy.notify
https://www.renpy.org/doc/html/other.ht ... npy.notify

Or look at the Notify Screen and make your own version of it called something else
https://www.renpy.org/doc/html/screen_s ... ify#notify
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

DannX
Regular
Posts: 99
Joined: Mon Mar 12, 2018 11:15 am
Contact:

Re: How to make timed text?

#5 Post by DannX »

Or you could use ATL:

Code: Select all

transform timed_hide(t):

    time t 
    linear .5 alpha 0

label start:

    show text "Hello World" at timed_hide(1)

    ""

    return

User avatar
AHAKuo
Regular
Posts: 41
Joined: Tue Feb 06, 2018 11:10 am
Projects: SoUnd Is ToxIc
Organization: AHAKuo
Tumblr: ahakuo
Deviantart: ahakuo
Contact:

Re: How to make timed text?

#6 Post by AHAKuo »

DannX wrote: Wed Mar 14, 2018 3:32 pm Or you could use ATL:

Code: Select all

transform timed_hide(t):

    time t 
    linear .5 alpha 0

label start:

    show text "Hello World" at timed_hide(1)

    ""

    return
This doesn't seem to work. I think this code only works for displayables not text.


###EDIT####


Oops I'm sorry. I've mistakenly forgot to put "show text" how stupid of me. It works now! Thank you so much! You're a lifesaver seriously :D <3
Last edited by AHAKuo on Fri Mar 16, 2018 10:23 am, edited 2 times in total.
Working on:

Image

User avatar
AHAKuo
Regular
Posts: 41
Joined: Tue Feb 06, 2018 11:10 am
Projects: SoUnd Is ToxIc
Organization: AHAKuo
Tumblr: ahakuo
Deviantart: ahakuo
Contact:

Re: How to make timed text?

#7 Post by AHAKuo »

trooper6 wrote: Wed Mar 14, 2018 3:23 pm You could just use renpy.notify
https://www.renpy.org/doc/html/other.ht ... npy.notify

Or look at the Notify Screen and make your own version of it called something else
https://www.renpy.org/doc/html/screen_s ... ify#notify
Not really what I'm going for but I'll give it a look. Thank you :3
Working on:

Image

User avatar
AHAKuo
Regular
Posts: 41
Joined: Tue Feb 06, 2018 11:10 am
Projects: SoUnd Is ToxIc
Organization: AHAKuo
Tumblr: ahakuo
Deviantart: ahakuo
Contact:

Re: How to make timed text?

#8 Post by AHAKuo »

Imperf3kt wrote: Wed Mar 14, 2018 2:59 pm
That is a screen action, not what the OP is after.

Perhaps the Paragraph pause function has what you want?
https://www.renpy.org/doc/html/text.html?#text-tag-p
The paragraph pause tag is a self-closing tag that terminates the current paragraph, and waits for the user to click to continue. If it is given an argument, the argument is interpreted as a number, and the wait automatically ends after that many seconds have passed.

Code: Select all

"Line 1{p}Line 2{p=1.0}Line 3"
No this isn't it. I've tried.
Working on:

Image

Post Reply

Who is online

Users browsing this forum: Andredron