Page 1 of 1

Improved Time System Library

PostPosted: Wed Jun 05, 2019 5:07 am
by Denk
Lately I have been using the Time System Library which comes with ADRIFT 5. Besides %Minute% and %Hour% it also has a variable called %Day% which I think is intended to keep track of which day it is. You could use this to print the date, e.g. if we are somewhere between day 4 and day 30 in the game, you could output "Date: %Day%th of July".

Unfortunately, it turns out, that the variable %Day% is not correctly updated when time passes midnight. For instance, it may take on negative values. And it is not updated when you sleep.

I have now modified the time system so that the variable %Day% is now correctly updated, both at midnight and when you sleep. Thus you can now use the Improved Time System Library to keep track of the date in the game.

The Improved Time System Library can be found here: http://www.adrift.co/game/1520

Re: Improved Time System Library

PostPosted: Wed Jun 05, 2019 10:54 am
by Lazzah
Denk wrote:Lately I have been using the Time System Library which comes with ADRIFT 5. Besides %Minute% and %Hour% it also has a variable called %Day% which I think is intended to keep track of which day it is. You could use this to print the date, e.g. if we are somewhere between day 4 and day 30 in the game, you could output "Date: %Day%th of July".

Unfortunately, it turns out, that the variable %Day% is not correctly updated when time passes midnight. For instance, it may take on negative values. And it is not updated when you sleep.

I have now modified the time system so that the variable %Day% is now correctly updated, both at midnight and when you sleep. Thus you can now use the Improved Time System Library to keep track of the date in the game.

The Improved Time System Library can be found here: http://www.adrift.co/game/1520

Thanks Denk! :Thanks:

Re: Improved Time System Library

PostPosted: Wed Jun 05, 2019 8:51 pm
by DazaKiwi
Good job Denk thanks for letting us know. I actually forgot we had one already with A5.