Pausing Timers

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
CalixtheGreat
Regular
Posts: 59
Joined: Thu Jun 08, 2017 12:00 am
Projects: Zephyr Breeze Investigations
itch: calixthegreat
Location: Philippines
Contact:

Pausing Timers

#1 Post by CalixtheGreat » Tue Oct 09, 2018 3:41 am

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.
Image
FB PAGE:
CALIX THE GREAT

User avatar
Andredron
Regular
Posts: 174
Joined: Thu Dec 28, 2017 2:37 pm
Location: Russia
Contact:

Re: Pausing Timers

#2 Post by Andredron » Tue Oct 09, 2018 9:15 am

import time
CurrentTime = time.time()
while 1:
....CurrentTime = time.time()-CurrentTime
....print(CurrentTime)
I know, I have terrible English
I'm writing a Renpy textbook (in Russian). I would be glad if someone translated into an English or German textbook https://yadi.sk/d/ZX_DonP63USRru Update 22.06.18

User avatar
CalixtheGreat
Regular
Posts: 59
Joined: Thu Jun 08, 2017 12:00 am
Projects: Zephyr Breeze Investigations
itch: calixthegreat
Location: Philippines
Contact:

Re: Pausing Timers

#3 Post by CalixtheGreat » 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?
Image
FB PAGE:
CALIX THE GREAT

User avatar
Andredron
Regular
Posts: 174
Joined: Thu Dec 28, 2017 2:37 pm
Location: Russia
Contact:

Re: Pausing Timers

#4 Post by Andredron » 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
I know, I have terrible English
I'm writing a Renpy textbook (in Russian). I would be glad if someone translated into an English or German textbook https://yadi.sk/d/ZX_DonP63USRru Update 22.06.18

User avatar
CalixtheGreat
Regular
Posts: 59
Joined: Thu Jun 08, 2017 12:00 am
Projects: Zephyr Breeze Investigations
itch: calixthegreat
Location: Philippines
Contact:

Re: Pausing Timers

#5 Post by CalixtheGreat » Mon Oct 15, 2018 11:37 pm

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. 😅
Image
FB PAGE:
CALIX THE GREAT

User avatar
CalixtheGreat
Regular
Posts: 59
Joined: Thu Jun 08, 2017 12:00 am
Projects: Zephyr Breeze Investigations
itch: calixthegreat
Location: Philippines
Contact:

Re: Pausing Timers

#6 Post by CalixtheGreat » Mon Oct 15, 2018 11:38 pm

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. 😅
Image
FB PAGE:
CALIX THE GREAT

Post Reply

Who is online

Users browsing this forum: TakeHomeTheCup