Time periods

I want to add something to the status bar i want to divide a day into Morning, midday, evening, midnight ect. How would you suggest doing that?

As far as printing the status line, see Section 17.21 of the documentation. As far as defining the segments of a day, I would think you could probably define a kind of value (see Section 4.5) and then use an every turn rule to check the time and set the appropriate part of the day based on the time.

Robert Rothman

Sorry I should have been more specific I want to change the status bar to show different times of day.

Read the page in the manual that RR suggested. Example 131 is particularly relevant.

And, again as RR said, you should probably use a kind of value, as described in Section 4.5.

[code]Canonical time is a kind of value. The canonical times are matins, lauds, terce, sext, vespers and compline.

The current period is a canonical time that varies. The current period is matins.

At 7:00 AM: now the current period is lauds.[/code]
and so on. (Of couse, you may want to adjust this to fit your game; not every game works well with Inform’s default of 1 turn = 1 minute.)

When play begins: now the right hand status line is "[the time of day] ([the current period])".