Minutes Portion from Time Of Day

Is there a command available that would let me evaluate the time of day with respect to the minutes element? For example, I want to check each turn if it is 4 minutes past the hour and, if so, move a vehicle to another room.

Every turn, if the minutes part of the time of day is 3, da da da

Note that it’s three, because at the end of the third minute it will trigger and the vehicle will be moved on the fourth minute.

Thanks. In the time between submitting this first post and getting it moderated, I found the page in the manual. Can’t believe I’d missed it on the first few passes. I also found the train (and train stations) example in the menu, which has been a great help

I am indeed trying to use Every turn, but trying to determine if it’s one of four different minutes past the hour. Say, 3, 18, 33, and 48.

Something like this, where ‘a train station is a kind of room’

Every turn when in a train station:
If the minutes of the time of day is 3, 18, 33, or 48:
Change the station of the train to Example Street;
say “The train is coming into the station.”.

You need to spell out each possibility separately:

Every turn when the location is a train station: If the minutes part of the time of day is 3 or the minutes part of the time of day is 18 or the minutes part of the time of day is 33 or the minutes part of the time of day is 48:

Or, a bit more compact using a list:

	If the minutes part of the time of day is listed in { 3, 18, 33, 48 }:

Or, using some maths:

	If the remainder after dividing the minutes part of the time of day by 15 is 3:

I also notice that you might be using an older version of Inform, because in the latest you need to use “when the location is a train station” instead of “when in a train station” and “now the station of the train is Example Street” instead of “change the station of the train to Example Street”.

Wouldn’t this work?

If the minutes part of the time of day is listed in {3, 18, 33, 48}:

Just guessing, didn’t try it out. See the Chapter on lists…

[size=85]Edit: Sorry, being too slow again…[/size]

Thanks, making the array solves my issue. Onwards to ever more problems.

Also, you’re right, my Inform was out of date. Updated now.