If anyone is interested, I made a 24 hour digital clock system for one of my games. Make sure scripting is advanced mode, etc.
Variables required: hours, minutes, temphours
In the Global Page Script:
$PAGETEXT := $PAGETEXT + "The time is "
IF %HOURS < 10 THEN $PAGETEXT := $PAGETEXT + "0" + %HOURS + ":"
IF %HOURS < 13 THEN $PAGETEXT := $PAGETEXT + %HOURS +":"
IF %HOURS > 12 THEN
BEGIN
%TEMPHOURS := %HOURS - 12
IF %TEMPHOURS < 10 THEN $PAGETEXT := $PAGETEXT + "0" + %TEMPHOURS + ":"
IF %TEMPHOURS < 13 THEN $PAGETEXT := $PAGETEXT + %TEMPHOURS +":"
END
IF %MINUTES < 10 THEN $PAGETEXT := $PAGETEXT + "0" + %MINUTES
IF %MINUTES > 9 THEN $PAGETEXT := $PAGETEXT + %MINUTES
IF %HOURS < 13 THEN $PAGETEXT := $PAGETEXT + " AM"
IF %HOURS > 12 THEN $PAGETEXT := $PAGETEXT + " PM"
This results in messages at the bottom of every page, that might look like one of these examples:
The time is 08:45 AM
The time is 12:30 PM
The time is 03:02 PM
Then add this to your Global Link Script:
IF %MINUTES > 59 THEN
BEGIN
%MINUTES := %MINUTES - 60
%HOURS := %HOURS + 1
END
IF %HOURS > 24 THEN %HOURS := %HOURS - 24
To make the time change in the game, every link that takes up an amount of time must have a script attached to it. Simply add the line "%MINUTES := %MINUTES + X" where X is the number of minutes the action takes to perform, and/or add this line too "%HOURS := %HOURS + X" where X is the number of hours it takes to perform.
In the text for the link, I write the time the action will take in brackets, and then the link text. Ie, "(+5 min) You take a quick shower."
If you want more than an hour to pass, say, 72 minutes, don't add 72 minutes to the link's script, add 1 hour and 12 minutes in the link's script, so that the Global Page and Global Link scripts will work properly. Keep things in lots of 60 mins and 24 hours.
I've also got Days and Weeks in my game. In the Global Link Script, whenever hours > 24, I add an additional line of script that adds +1 to the day. In link scripts, a line can be added to make the variable DAYS change, and in the Global Link Script, every time DAYS > 7, add 1 to a WEEKS variable. Doing this, you could have events in your game that happen on certain days of the week, like, shops being closed on weekends, having to turn up for work by 9:00 AM, and stuff like that. I've been using this time system for a detective story I'm working on, where the player has a time limit in which to solve a case, and can go to different places and talk to people, etc.