Page 1 of 1
Pausing Timers
Posted: Tue Oct 09, 2018 3:41 am
by CalixtheGreat
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.
Re: Pausing Timers
Posted: Tue Oct 09, 2018 9:15 am
by Andredron
import time
CurrentTime = time.time()
while 1:
....CurrentTime = time.time()-CurrentTime
....print(CurrentTime)
Re: Pausing Timers
Posted: Sat Oct 13, 2018 11:29 pm
by CalixtheGreat
Andredron wrote: ↑Tue Oct 09, 2018 9:15 am
import time
CurrentTime = time.time()
while 1:
....CurrentTime = time.time()-CurrentTime
....print(CurrentTime)
So, what code will I type everytime I want to pause or resume the timer?
Re: Pausing Timers
Posted: Mon Oct 15, 2018 2:18 pm
by Andredron
CalixtheGreat wrote: ↑Sat Oct 13, 2018 11:29 pm
Andredron wrote: ↑Tue Oct 09, 2018 9:15 am
import time
CurrentTime = time.time()
while 1:
....CurrentTime = time.time()-CurrentTime
....print(CurrentTime)
So, what code will I type everytime I want to pause or resume the timer?
Read
viewtopic.php?f=51&t=47774
Re: Pausing Timers
Posted: Mon Oct 15, 2018 11:37 pm
by CalixtheGreat
Andredron wrote: ↑Mon Oct 15, 2018 2:18 pm
CalixtheGreat wrote: ↑Sat Oct 13, 2018 11:29 pm
Andredron wrote: ↑Tue Oct 09, 2018 9:15 am
import time
CurrentTime = time.time()
while 1:
....CurrentTime = time.time()-CurrentTime
....print(CurrentTime)
So, what code will I type everytime I want to pause or resume the timer?
Read
viewtopic.php?f=51&t=47774
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.
Re: Pausing Timers
Posted: Mon Oct 15, 2018 11:38 pm
by CalixtheGreat
Andredron wrote: ↑Mon Oct 15, 2018 2:18 pm
CalixtheGreat wrote: ↑Sat Oct 13, 2018 11:29 pm
Andredron wrote: ↑Tue Oct 09, 2018 9:15 am
import time
CurrentTime = time.time()
while 1:
....CurrentTime = time.time()-CurrentTime
....print(CurrentTime)
So, what code will I type everytime I want to pause or resume the timer?
Read
viewtopic.php?f=51&t=47774
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.
Re: Pausing Timers
Posted: Wed Oct 17, 2018 3:04 pm
by IrinaLazareva
'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
Re: Pausing Timers
Posted: Sat Oct 20, 2018 10:16 am
by CalixtheGreat
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
Re: Pausing Timers
Posted: Tue Feb 05, 2019 6:25 am
by CalixtheGreat
Bump