Creating a Variable to track Gametime

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
dlspierce
Newbie
Posts: 1
Joined: Thu Feb 16, 2017 2:27 pm
Contact:

Creating a Variable to track Gametime

#1 Post by dlspierce »

Hello. I am currently working on a game where a location would trigger different outcomes depending on how long you were playing the game when you visit.
For example, if you visit the "house" in the morning (first 20minutes) you get a different series of events than if you visit midday (second 20minutes).

I think this can be done with a variable that adds 1 every second or minute, and then running a variable check when you enter a new location so that the proper dialogue plays. I have looked all over the forums and I have yet to find the code you would need. Does anybody have any idea how to do this?

PS. I want this timer to start running when the game starts and to only pause for the save/load menu. I don't want it to pause for conversation or user input.

Thanks, I thank anybody for help in advance.

User avatar
xavimat
Eileen-Class Veteran
Posts: 1461
Joined: Sat Feb 25, 2012 8:45 pm
Completed: Yeshua, Jesus Life, Cops&Robbers
Projects: Fear&Love
Organization: Pilgrim Creations
Github: xavi-mat
itch: pilgrimcreations
Location: Spain
Discord: xavimat
Contact:

Re: Creating a Variable to track Gametime

#2 Post by xavimat »

Comunidad Ren'Py en español: ¡Únete a nuestro Discord!
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)

User avatar
Taleweaver
Writing Maniac
Posts: 3428
Joined: Tue Nov 11, 2003 8:51 am
Completed: Metropolitan Blues, The Loyal Kinsman, Daemonophilia, The Dreaming, The Thirteenth Year, Adrift, Bionic Heart 2, Secrets of the Wolf, The Photographer
Projects: The Pilgrim's Path, Elspeth's Garden, Secret Adventure Game!
Organization: Tall Tales Productions
Location: Germany
Contact:

Re: Creating a Variable to track Gametime

#3 Post by Taleweaver »

Moved to Ren'Py questions.
Scriptwriter and producer of Metropolitan Blues
Creator of The Loyal Kinsman
Scriptwriter and director of Daemonophilia
Scriptwriter and director of The Dreaming
Scriptwriter of Zenith Chronicles
Scriptwriter and director of The Thirteenth Year
Scriptwriter and director of Romance is Dead
Scriptwriter and producer of Adrift
More about me in my blog
"Adrift - Like Ever17, but without the Deus Ex Machina" - HigurashiKira

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot]