Pausing Timers
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.
- CalixtheGreat
- Regular
- Posts: 72
- Joined: Thu Jun 08, 2017 12:00 am
- Projects: Zephyr Breeze Investigations
- itch: calixthegreat
- Location: Philippines
- Contact:
Pausing Timers
Good day.
Just want to ask if there's a way to pause the timer then resume it again at certain point of the game?
I also have some problems when it comes on showing the screen (timer) and another screen(dialogue) with some hyperlinks on it. The countdown timer works perfectly but I can't press the hyperlinks from the dialogues.
A sample code will be much appreciated.
Sorry if my english is not that good. Haha
Thanks in advance.
Just want to ask if there's a way to pause the timer then resume it again at certain point of the game?
I also have some problems when it comes on showing the screen (timer) and another screen(dialogue) with some hyperlinks on it. The countdown timer works perfectly but I can't press the hyperlinks from the dialogues.
A sample code will be much appreciated.
Sorry if my english is not that good. Haha
Thanks in advance.
Re: Pausing Timers
import time
CurrentTime = time.time()
while 1:
....CurrentTime = time.time()-CurrentTime
....print(CurrentTime)
CurrentTime = time.time()
while 1:
....CurrentTime = time.time()-CurrentTime
....print(CurrentTime)
Renpy textbook (in Russian). https://disk.yandex.ru/i/httNEajU7iFWHA (all information is out of date) Update 22.06.18
Sawa - a game of the Drow Nation
Honest Critique
Poses in visual novels, or how to hold a character properly in the frame
Help save articles to the webarchive. [/color]
Sawa - a game of the Drow Nation
Honest Critique
Poses in visual novels, or how to hold a character properly in the frame
Help save articles to the webarchive. [/color]
- CalixtheGreat
- Regular
- Posts: 72
- Joined: Thu Jun 08, 2017 12:00 am
- Projects: Zephyr Breeze Investigations
- itch: calixthegreat
- Location: Philippines
- Contact:
Re: Pausing Timers
CalixtheGreat wrote: ↑Sat Oct 13, 2018 11:29 pmSo, what code will I type everytime I want to pause or resume the timer?
Read viewtopic.php?f=51&t=47774
Renpy textbook (in Russian). https://disk.yandex.ru/i/httNEajU7iFWHA (all information is out of date) Update 22.06.18
Sawa - a game of the Drow Nation
Honest Critique
Poses in visual novels, or how to hold a character properly in the frame
Help save articles to the webarchive. [/color]
Sawa - a game of the Drow Nation
Honest Critique
Poses in visual novels, or how to hold a character properly in the frame
Help save articles to the webarchive. [/color]
- CalixtheGreat
- Regular
- Posts: 72
- Joined: Thu Jun 08, 2017 12:00 am
- Projects: Zephyr Breeze Investigations
- itch: calixthegreat
- Location: Philippines
- Contact:
Re: Pausing Timers
Oh. I'm talking about the screen timer. Like those in QTE but I want to know if there's a way to pause and resume the timer.Andredron wrote: ↑Mon Oct 15, 2018 2:18 pmCalixtheGreat wrote: ↑Sat Oct 13, 2018 11:29 pmSo, what code will I type everytime I want to pause or resume the timer?
Read viewtopic.php?f=51&t=47774
- CalixtheGreat
- Regular
- Posts: 72
- Joined: Thu Jun 08, 2017 12:00 am
- Projects: Zephyr Breeze Investigations
- itch: calixthegreat
- Location: Philippines
- Contact:
Re: Pausing Timers
Oh. I'm talking about the screen timer. Like those in QTE but I want to know if there's a way to pause and resume the timer.Andredron wrote: ↑Mon Oct 15, 2018 2:18 pmCalixtheGreat wrote: ↑Sat Oct 13, 2018 11:29 pmSo, what code will I type everytime I want to pause or resume the timer?
Read viewtopic.php?f=51&t=47774
- IrinaLazareva
- Veteran
- Posts: 399
- Joined: Wed Jun 08, 2016 1:49 pm
- Projects: Legacy
- Organization: SunShI
- Location: St.Petersburg, Russia
- Contact:
Re: Pausing Timers
'pseudo-timer'
Code: Select all
default mzt = 10
default mzton = True
screen countdown():
if mzton and mzt>0:
timer 1 repeat True action SetVariable('mzt', mzt-1)
if mzt>0:
text '[mzt]' size 150 at truecenter
textbutton 'Pause' action ToggleVariable('mzton') at right
else:
text 'K A B O O M ! ! !' size 100 at letboom
textbutton 'Get Out' action Quit(False) at right
transform letboom:
align(.5, .5) zoom .0 alpha .0
easein_bounce .7 zoom 1.0 alpha 1.0
label start:
$ quick_menu = False
call screen countdown
return
- CalixtheGreat
- Regular
- Posts: 72
- Joined: Thu Jun 08, 2017 12:00 am
- Projects: Zephyr Breeze Investigations
- itch: calixthegreat
- Location: Philippines
- Contact:
Re: Pausing Timers
So, my problem about the timer was finally fixed. The only problem left is that, when I show the timer screen and the other screen (dialogue with hyperlink), I can't press the hyperlink anymore.
Here's the sample code I used in creating the screem with hyperlinks: viewtopic.php?t=51748
Here's the sample code I used in creating the screem with hyperlinks: viewtopic.php?t=51748
- CalixtheGreat
- Regular
- Posts: 72
- Joined: Thu Jun 08, 2017 12:00 am
- Projects: Zephyr Breeze Investigations
- itch: calixthegreat
- Location: Philippines
- Contact:
Who is online
Users browsing this forum: Andredron