Twine Version: 2.3.5
Story Format: Sugarcube 2
Well i have this widget below:
--------------------------------------------------------------------------------------------------------------------------
/*
Date & Time Printing Widget Definitions
*/
/* Prints the current date ("{weekday} {month} {day}, {year}"). */
<<widget “date”>>\
<<print String.format("{0} {1} {2}, {3}",
GameDays[$gameDate.getDay()],
GameMonths[$gameDate.getMonth()],
$gameDate.getDate(),
$gameDate.getFullYear()
)>>\
<>
/* Prints the current time (12H). */
<<widget “time12hr”>>\
<<if $gameDate.getHours() eq 0>>\
12\
<<elseif $gameDate.getHours() gt 12>>\
<<print $gameDate.getHours() - 12>>\
<>\
<<print $gameDate.getHours()>>\
<>:\
<<if $gameDate.getMinutes() lt 10>>0<><<print $gameDate.getMinutes()>> \
<<if $gameDate.getHours() gte 12>>PM<>AM<>\
<>
/* Prints the current time (24H). */
<<widget “time24hr”>>\
<<if $gameDate.getHours() lt 10>>0<><<print $gameDate.getHours()>>:\
<<if $gameDate.getMinutes() lt 10>>0<><<print $gameDate.getMinutes()>>\
<>
/* Prints the current date and time (12H). */
<<widget “datetime”>><> <> (<>)<>
--------------------------------------------------------------------------------------------------------------------------
And i want to reset a bunch of variable every time an day end.
My purpose is to player don´t eat more or use an specific item more than one or two times in a day.
For example breakfast. I created a variable $breakfast. So, the player eat, get energy restored and are unable to eat again from now on. I able to handle this with if is false and if is true.
But i want to that variable and other variables like that one reset whether the player sleeps or not.
So at the start of every day (00:00), variables like $breakfast resets.
Im learning alot reading documentation and questions in forums, but that specific question i can´t find anywhere. Help please?