Countdown timer with milliseconds
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.
-
- Regular
- Posts: 42
- Joined: Sun Apr 12, 2020 11:50 pm
- Projects: Wind and Spirit
- Organization: Monoway Studios
- Contact:
Countdown timer with milliseconds
I was wondering how to go about making a countdown time with seconds and milliseconds. I just thought it would look better in the game. Is there any way to bring this about in ren'py?
The goal of the revolution is to achieve the people's rights, but during the course of the revolution, we must stress military power - and the two are mutually contradictory.
-Sun Yat-sen
"Become a Visual Novel writer they said, it will be fun" (little did they know they were right)
-Sun Yat-sen
"Become a Visual Novel writer they said, it will be fun" (little did they know they were right)
Re: Countdown timer with milliseconds
Hi, abysswatcher,
Screen timer with milliseconds doesn't fit your demands?
Or maybe you prefer using animated bar as in PyTom timed choices
Screen timer with milliseconds doesn't fit your demands?
Code: Select all
screen countdown(time, timer_jump):
timer 0.01 repeat True action If(time > 0, true=SetVariable('time', time - 0.01), false=[Hide('countdown'), Jump(timer_jump)])
text str(time):
xalign 0.5
label start:
show screen countdown(20.0, "timeout_label")
# Your code
label timeout_label:
"Time ended"
Who is online
Users browsing this forum: No registered users