Different description for different time of day

I'm using The Pixie's Clock_Lib and I want to give a different description to a room depending upon the time of day (eg people are working in an area during the day, and at night there is no one around). Any clues? Cheers.

Briefly: Have the description be a script, rather than text. Use an "if" statement to test if it is day time, then print a message if so, and have an "else" to print a message if not.

Hi The Pixie, thanks for your reply. Is this a case of just saying:

If: [expression] IsEvening
Then
Print: It is now evening.

I've tried that but it returns an error.

You would need to find out what variable in the library stores the information about what time of day it is. The code "If IsEvening" isn't valid. I haven't used that library, but if the time of day is set as a boolean attribute on the game object called IsEvening, then it would be something like this:


if (game.IsEvening = true) {
msg ("It is evening.")
}
else {
msg ("It is daytime.")
}

Hi sgrieg and thanks for your reply. If I run that it comes back with an error:

Error running script: Error compiling expression 'game.IsEvening = true': CompareElement: Operation 'Equal' is not defined for types 'Object' and 'Boolean'


That means it doesn't know what "game.IsEvening" is. It goes back to what Scott was saying - you need to find out what the variable is that you need to be checking. (He took a guess, but it seems to be something else. :) )

Indeed, but it should know it because I am using The Pixie's Clock library. Is.Evening is one of its features.

Then you should read the wikipage of it. IsEvening is a function and you would call it like this:

If: [expression] IsEvening ()
Then
Print: It is now evening.

Aha, I had omitted the parenthesis. Thanks, Pertex.