So I was wondering if there is any way to implement a feature where the game tracks the computers time in real life and a certain event will happen in game during a certain amount of time, I'm not sure how I could describe it other than:
After 30 minutes pass something will happen, this event lasts for 15 minutes, after this timeframe this event will end, and it repeats like this until the person quits the game.
I was thinking about using this for an extra, secret route or something but for now I'm just kind of experimenting with Renpy and just want to know how to do cool things like this.
Real-Time events with Renpy
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.
-
- Newbie
- Posts: 24
- Joined: Sun Apr 01, 2018 3:25 pm
- Projects: Project 4th Wall
- itch: https://umberbridge.
- Contact:
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3791
- Joined: Mon Dec 14, 2015 5:05 am
- itch: Imperf3kt
- Location: Your monitor
- Contact:
Re: Real-Time events with Renpy
Certainly possible by using python datetime.
Look herefor example usage.
viewtopic.php?f=8&t=51735&p=495270#p495270
Look herefor example usage.
viewtopic.php?f=8&t=51735&p=495270#p495270
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Twitter
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
-
- Newbie
- Posts: 24
- Joined: Sun Apr 01, 2018 3:25 pm
- Projects: Project 4th Wall
- itch: https://umberbridge.
- Contact:
Re: Real-Time events with Renpy
I already know how to do that, what I'm asking is how would I be able to make something available during a certain time and end after a certain amount of time.
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3791
- Joined: Mon Dec 14, 2015 5:05 am
- itch: Imperf3kt
- Location: Your monitor
- Contact:
Re: Real-Time events with Renpy
That module returns the time as a variable, so just treat it as such
Make a screen, slap in an 'if time is this, do this' and show the screen
I'd like to link you a better example, but cannot find it through both the search function, and google.
Make a screen, slap in an 'if time is this, do this' and show the screen
I'd like to link you a better example, but cannot find it through both the search function, and google.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Twitter
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Who is online
Users browsing this forum: Ahrefs [Bot], Andredron, Bing [Bot], Draida