Okay. So I got impatient. What I did was below and you can tell me if there's an easy fix or if I should scrap it and start anew...
I have an object in the game tab called 'twentyfourhours' and gave it an integer attribute called 'HoursCount' and set it at 105.
I have a changedHoursCount attribute as well. I added a script to that --> If object attribute equals 1, then... If 'inside' print message, Else print message. I set a changed script at 15, 30, 45, 60, 75, 90, and 105. I have an 'If' nested in there because I want a different message to appear at those turns. I also raise a flag in there as well to add a random chance event at different times of day.
I created a turnscript... that looks like this: twentyfourhours.HoursCount = twentyfourhours.HoursCount + 1
Let me know if I can alter this simply and keep it as is or if I should scrap it and go with your proposal. Of course, I would need to reset the counter after turn 105, but that can't be too hard, right? I appreciate your helps!
Below is the code for it if you need to check it out.
The twentyfourhours changedHoursCount code:
if (twentyfourhours.HoursCount = 1) {
if (GetBoolean(Xanadu, "inside")) {
msg ("Even being inside, you can tell that the morning sun has risen in the sky. The air in here is noticeably warmer.")
SetObjectFlagOff (twentyfourhours, "morning")
SetObjectFlagOn (twentyfourhours, "noon")
}
else {
msg ("The shadows have grown shorter and the sun hangs directly over your head. It's hot out here.")
SetObjectFlagOff (twentyfourhours, "morning")
SetObjectFlagOn (twentyfourhours, "noon")
}
}
else if (twentyfourhours.HoursCount = 30) {
if (GetBoolean(Xanadu, "inside")) {
msg ("It's still hot, but the heat seems to be fading a bit in here and a breeze gently brushes the walls outside.")
SetObjectFlagOff (twentyfourhours, "noon")
SetObjectFlagOn (twentyfourhours, "afternoon")
}
else {
msg ("You have noticed the shadows have grown longer and a slight breeze gives reprieve to your hot skin.")
SetObjectFlagOff (twentyfourhours, "noon")
SetObjectFlagOn (twentyfourhours, "afternoon")
}
}
else if (twentyfourhours.HoursCount = 45) {
if (GetBoolean(Xanadu, "inside")) {
msg ("The light in the room seems to be retreating. The shadows grow darker and the room colder.")
SetObjectFlagOff (twentyfourhours, "afternoon")
SetObjectFlagOn (twentyfourhours, "dusk")
}
else {
msg ("The sun is shrinking on the horizon and the once bright sky is rapidly darkening. A chill is ushered in by a whistling wind.")
SetObjectFlagOff (twentyfourhours, "afternoon")
SetObjectFlagOn (twentyfourhours, "dusk")
}
}
else if (twentyfourhours.HoursCount = 60) {
if (GetBoolean(Xanadu, "inside")) {
msg ("The room has grown quite cold. Despite the growing darkness in the room, you can see a cloud of microscopic water crystals every time you exhale.")
SetObjectFlagOff (twentyfourhours, "dusk")
SetObjectFlagOn (twentyfourhours, "evening")
}
else {
msg ("The sun has fully retreated leaving the dark sky and their stars to keep you company. It is quite chilly out here now.")
SetObjectFlagOff (twentyfourhours, "dusk")
SetObjectFlagOn (twentyfourhours, "evening")
}
}
else if (twentyfourhours.HoursCount = 75) {
if (GetBoolean(Xanadu, "inside")) {
SetObjectFlagOff (twentyfourhours, "evening")
SetObjectFlagOn (twentyfourhours, "midnight")
SetObjectFlagOn (twentyfourhours, "dark")
if (GetBoolean(Xanadu, "light")) {
msg ("The darkness in the room would be absolute now if it wasn't for your light source. Your light, however, does nothing for the bitter cold.")
}
else {
msg ("The moonlight offers insufficient light. It is now pitch black in here. If you have a lightsource, you better get to using it.")
}
}
else {
msg ("It is uncomfortably cold now and the only light you can use to travel by is supplied by the moon and the faint stars overhead.")
SetObjectFlagOff (twentyfourhours, "evening")
SetObjectFlagOn (twentyfourhours, "midnight")
}
}
else if (twentyfourhours.HoursCount = 90) {
if (GetBoolean(Xanadu, "inside")) {
msg ("The room brightens a bit and warmth begins to return to the air.")
SetObjectFlagOff (twentyfourhours, "midnight")
SetObjectFlagOn (twentyfourhours, "dawn")
SetObjectFlagOff (twentyfourhours, "dark")
}
else {
msg ("The warming sun has peaked over the horizon and its light casts long shadow across the ground.")
SetObjectFlagOff (twentyfourhours, "midnight")
SetObjectFlagOn (twentyfourhours, "dawn")
SetObjectFlagOff (twentyfourhours, "dark")
}
}
else if (twentyfourhours.HoursCount = 105) {
if (GetBoolean(Xanadu, "inside")) {
msg ("The room has become a little brighter and warmer.")
SetObjectFlagOff (twentyfourhours, "dawn")
SetObjectFlagOn (twentyfourhours, "morning")
}
else {
msg ("Thankfully, the stars have become invisible, the winds subsided, and the air has warmed.")
SetObjectFlagOff (twentyfourhours, "dawn")
SetObjectFlagOn (twentyfourhours, "morning")
}
}
else if (twentyfourhours.HoursCount = 15) {
if (GetBoolean(Xanadu, "inside")) {
msg ("It's still hot, but the heat seems to be fading a bit in here and a breeze gently brushes the walls outside.")
SetObjectFlagOff (twentyfourhours, "noon")
SetObjectFlagOn (twentyfourhours, "afternoon")
}
else {
msg ("You have noticed the shadows have grown longer and a slight breeze gives reprieve to your hot skin.")
SetObjectFlagOff (twentyfourhours, "noon")
SetObjectFlagOn (twentyfourhours, "afternoon")
}
}
And the TS code that is supposed to add one to the HoursCount attribute each time:
twentyfourhours.HoursCount = twentyfourhours.HoursCount + 1