Hello!
I was wondering if there was a code to check the player's real time (based on the player's computer clock) to use to trigger certain events? For example, I wanted to simulate having dailies, so certain activities you can do once every day, but then have it reset at a certain time.
For example, let's say you can do 1 jigsaw puzzle a day. After you do the puzzle, it will be unavailable until it resets again at 12 am local time. Is this possible? Also if it is possible to check calendar, to simulate weeklys, could this also be done by checking if it's a specific day and have it be unavailable until that specific day comes again? Thanks!
Can Events/Activities be triggered based on real life time?
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.
- Kokoro Hane
- Eileen-Class Veteran
- Posts: 1237
- Joined: Thu Oct 27, 2011 6:51 pm
- Completed: 30 Kilowatt Hours Left, The Only One Girl { First Quarter }, An Encounter ~In The Rain~, A Piece of Sweetness, Since When Did I Have a Combat Butler?!, Piece by Piece, +many more
- Projects: Fateful Encounter, Operation: Magic Hero
- Organization: Tofu Sheets Visual
- Deviantart: kokoro-hane
- itch: tofu-sheets-visual
- Contact:
Can Events/Activities be triggered based on real life time?
PROJECTS:
Operation: Magic Hero [WiP]
Piece By Piece [COMPLETE][Spooktober VN '20]
RE/COUNT RE:VERSE [COMPLETE][RPG]
Since When Did I Have a Combat Butler?! [COMPLETE][NaNoRenO2020+]
Crystal Captor: Memory Chronicle Finale [COMPLETE][RPG][#1 in So Bad It's Good jam '17]
But dear God, You're the only North Star I would follow this far
Owl City "Galaxies"
Operation: Magic Hero [WiP]
Piece By Piece [COMPLETE][Spooktober VN '20]
RE/COUNT RE:VERSE [COMPLETE][RPG]
Since When Did I Have a Combat Butler?! [COMPLETE][NaNoRenO2020+]
Crystal Captor: Memory Chronicle Finale [COMPLETE][RPG][#1 in So Bad It's Good jam '17]
But dear God, You're the only North Star I would follow this far
Owl City "Galaxies"
Re: Can Events/Activities be triggered based on real life time?
You can use time or datetime libraries for that. Here are some examples:Kokoro Hane wrote: ↑Thu Dec 22, 2022 9:31 pm I was wondering if there was a code to check the player's real time (based on the player's computer clock) to use to trigger certain events?
viewtopic.php?f=8&t=40687&p=430540#p430540
viewtopic.php?f=8&t=37939#p410599
viewtopic.php?f=51&t=47774
Although a player can cheat, changing the system time. You can try to avoid it by checking the internet time.
viewtopic.php?f=8&t=65745&p=556806&hili ... me#p556795
- Kokoro Hane
- Eileen-Class Veteran
- Posts: 1237
- Joined: Thu Oct 27, 2011 6:51 pm
- Completed: 30 Kilowatt Hours Left, The Only One Girl { First Quarter }, An Encounter ~In The Rain~, A Piece of Sweetness, Since When Did I Have a Combat Butler?!, Piece by Piece, +many more
- Projects: Fateful Encounter, Operation: Magic Hero
- Organization: Tofu Sheets Visual
- Deviantart: kokoro-hane
- itch: tofu-sheets-visual
- Contact:
Re: Can Events/Activities be triggered based on real life time?
The second code made the most sense to me, I will test this out! Thank you for your help! ^^_ticlock_ wrote: ↑Fri Dec 23, 2022 12:10 amYou can use time or datetime libraries for that. Here are some examples:Kokoro Hane wrote: ↑Thu Dec 22, 2022 9:31 pm I was wondering if there was a code to check the player's real time (based on the player's computer clock) to use to trigger certain events?
viewtopic.php?f=8&t=40687&p=430540#p430540
viewtopic.php?f=8&t=37939#p410599
viewtopic.php?f=51&t=47774
Although a player can cheat, changing the system time. You can try to avoid it by checking the internet time.
viewtopic.php?f=8&t=65745&p=556806&hili ... me#p556795
PROJECTS:
Operation: Magic Hero [WiP]
Piece By Piece [COMPLETE][Spooktober VN '20]
RE/COUNT RE:VERSE [COMPLETE][RPG]
Since When Did I Have a Combat Butler?! [COMPLETE][NaNoRenO2020+]
Crystal Captor: Memory Chronicle Finale [COMPLETE][RPG][#1 in So Bad It's Good jam '17]
But dear God, You're the only North Star I would follow this far
Owl City "Galaxies"
Operation: Magic Hero [WiP]
Piece By Piece [COMPLETE][Spooktober VN '20]
RE/COUNT RE:VERSE [COMPLETE][RPG]
Since When Did I Have a Combat Butler?! [COMPLETE][NaNoRenO2020+]
Crystal Captor: Memory Chronicle Finale [COMPLETE][RPG][#1 in So Bad It's Good jam '17]
But dear God, You're the only North Star I would follow this far
Owl City "Galaxies"
Who is online
Users browsing this forum: Google [Bot]