Hi people! (sorry the bad English and I really did not want to have to get to the point of asking here!) I have read several topics about 'import time' and etc... I was wanting to make a game that used pc time ( at least) and that it recognizes the passage of the hours...
* The player spends an amount of energy X in action (type move) (This I do quietly (In case I only put a save with automatic save and a reset done by me))
* When this energy is spent I give a check and if it is 0 pause the renpy ".pause" for seconds and I have to rechecar ... if he has enough he will return to the game
* What I need help with and to get this amount of energy to be loaded hourly even with the game closed or not (I wanted to be able to do in pc and android) and that it stops when it reaches a limit (type ' if energy <100: 'or something like this)
* PS: I also wanted to be able to block access to a minigame every time it was played. (Playable only every 24 hours (based on the time the player played last time the access button is available))
Sorry for the bad english ^^
Passing time in a game ...
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: 17
- Joined: Wed Jan 16, 2019 11:59 pm
- Contact:
- Remix
- Eileen-Class Veteran
- Posts: 1628
- Joined: Tue May 30, 2017 6:10 am
- Completed: None... yet (as I'm still looking for an artist)
- Projects: An un-named anime based trainer game
- Contact:
Re: Passing time in a game ...
You likely do not want to go the full hog and write your own system based on python time module.
Instead, you are likely to get an easier framework built by basing it on:
renpy.get_game_runtime() which returns (iirc) the seconds float counting how long has been spent in non-main-menu areas of the game.
The rest of the code you'll have to write yourself though and you should be aware of RENPY_TIMEWARP in your released game: https://www.renpy.org/doc/html/environm ... ables.html
Instead, you are likely to get an easier framework built by basing it on:
renpy.get_game_runtime() which returns (iirc) the seconds float counting how long has been spent in non-main-menu areas of the game.
The rest of the code you'll have to write yourself though and you should be aware of RENPY_TIMEWARP in your released game: https://www.renpy.org/doc/html/environm ... ables.html
Frameworks & Scriptlets:
- Speech Bubble dialogue system
- Multiple Notify with ATL and history
- (WIP) Radial Masking - needs updating to use Shader
- 7.4 - Smooth Tinting using ATL and matrixcolor
- Several other repositories there too
-
- Newbie
- Posts: 17
- Joined: Wed Jan 16, 2019 11:59 pm
- Contact:
Re: Passing time in a game ...
you know if i can use import time for make my 'PS' ?
- Remix
- Eileen-Class Veteran
- Posts: 1628
- Joined: Tue May 30, 2017 6:10 am
- Completed: None... yet (as I'm still looking for an artist)
- Projects: An un-named anime based trainer game
- Contact:
Re: Passing time in a game ...
Python's time module is incorporated within Ren'Py, so if you wanted (inside an init python: block) you can easily do import time
Frameworks & Scriptlets:
- Speech Bubble dialogue system
- Multiple Notify with ATL and history
- (WIP) Radial Masking - needs updating to use Shader
- 7.4 - Smooth Tinting using ATL and matrixcolor
- Several other repositories there too
Who is online
Users browsing this forum: Karrion