Hey there! I’m using Real Date and Time by Ron Newcomb to create events that only happen once a day, in real time, so that the player can’t abuse a powerful healing feature that would otherwise let them cheat. I’ve managed to store the day and year as numbers, but I can’t work out how to store the month. I tried duplicating the value directly from ‘Real Date and Time’ with a slightly different name, but I get that annoying ‘Like saying a door is 20’ error. Can anyone help?
This is the value I need to clone (I also need to be able to set the clone from the real time version, if anyone can help with that?):
A month is a kind of value. The months are January, February, March, April, May, June, July, August, September, October, November, December.
I think you just need to create a month variable:
The stored month is a month that varies.
and then copy the player’s month inside your rule:
now the stored month is the player's month.
[code]Include Real Date and Time by Ron Newcomb.
Lab is a room.
The stored year is a number that varies. The stored day is a number that varies. The stored month is a month that varies.
now the stored year is the player’s year;
now the stored day is the player’s day;
now the stored month is the player’s month.
say “[Stored year]-[Stored Month]-[Stored day].”[/code]
(The in-IDE interpreter doesn’t seem to support the date/time feature; I had to release this and run it in Gargoyle to make sure it was working.)
Oh, thank you! And thanks for checking it worked too. That’s much easier than what I had.