Is there a way to make a time delay in renpy? How would I like make it so that after a character's dialouge shows up, a given amount of seconds later maybe the screen or something would change? Renpy is very based around the user having to click for changes to happen, but a time delay would be great. I've been using something like:
( A is some character btw)
----------------------------------------
A "hi"
python:
import time
time.sleep(5)
A "This is after 5 seconds"
---------------------------------------
So, what would happen here is that A would say hi, and 5 seconds later A would say "This is after 5 seconds". All good right? no, because if I click during any of those 5 seconds, it would think I have already clicked for the "this is after 5 seconds" and it would move on to other later dialouge. Is there any better way to do this?
Pls halppppp me
How would I make a time delay?
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.
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.
-
- Newbie
- Posts: 3
- Joined: Wed Mar 06, 2019 6:08 pm
- Projects: project yinGod
- Contact:
- Per K Grok
- Miko-Class Veteran
- Posts: 882
- Joined: Fri May 18, 2018 1:02 am
- Completed: the Ghost Pilot, Sea of Lost Ships, Bubbles and the Pterodactyls, Defenders of Adacan Part 1-3, the Phantom Flyer
- itch: per-k-grok
- Location: Sverige
- Contact:
Re: How would I make a time delay?
You could do something like thisSavage Bananas wrote: ↑Mon Mar 18, 2019 5:43 pm Is there a way to make a time delay in renpy? How would I like make it so that after a character's dialouge shows up, a given amount of seconds later maybe the screen or something would change? Renpy is very based around the user having to click for changes to happen, but a time delay would be great. I've been using something like:
( A is some character btw)
----------------------------------------
A "hi"
python:
import time
time.sleep(5)
A "This is after 5 seconds"
---------------------------------------
So, what would happen here is that A would say hi, and 5 seconds later A would say "This is after 5 seconds". All good right? no, because if I click during any of those 5 seconds, it would think I have already clicked for the "this is after 5 seconds" and it would move on to other later dialouge. Is there any better way to do this?
Pls halppppp me
Code: Select all
python:
renpy.say(A, "Hi", interact=False)
renpy.pause(delay=5.0, hard=True)
renpy.say(A, "This is 5 seconds later.", interact=True)
https://www.renpy.org/doc/html/statemen ... #renpy.say
more on renpy.pause here
https://www.renpy.org/doc/html/other.ht ... enpy.pause
and why hard pause is not encouraged.
- Remix
- Eileen-Class Veteran
- Posts: 1628
- Joined: Tue May 30, 2017 6:10 am
- Completed: None... yet (as I'm still looking for an artist)
- Projects: An un-named anime based trainer game
- Contact:
Re: How would I make a time delay?
Or use {w=5.0} tag to make it wait 5 seconds then {nw} tag to make the dialogue not need interaction:
Code: Select all
label start:
e "Hi{w=2.0}{nw}"
e "There{w=2.0}{nw}"
e "Stranger"
Frameworks & Scriptlets:
- Speech Bubble dialogue system
- Multiple Notify with ATL and history
- (WIP) Radial Masking - needs updating to use Shader
- 7.4 - Smooth Tinting using ATL and matrixcolor
- Several other repositories there too
Who is online
Users browsing this forum: Ahrefs [Bot]