Message wont dissplay

I’m trying to have a message display the first time the player enters the room based on a truth state, and have that truth state switch after entering the room. The message isn’t showing though. I’ve tried before, and after rules, but neither are working…

I’m not sure if it’s because of the time the truth state switches, or what…

[code]after going to Tia’s Garden:
now chat-TiaNiceGarden is sc-active; now EsherEnteredGarden is true; now chat-TiaWhoMadeThisPlace is sc-active; now chat-TiaWow is sc-active; continue the action.

before going to Tia’s Garden when EsherEnteredGarden is false:
say “Esher Entered the garden!”; [/code]

actually with the before rule the message is posted in the end of the prior room…so now I know what that does, but I’d like the message to be posted in the entered room…

okay, on an update to the situation I edited the room description…

the description of Tia's Garden is "[if EsherEnteredGarden is false]When Esher stepped out of the thin trail to where Tia was he was met by the most wondrous garden. It was placed in a small well rounded clearing, sitting on top of a soft later of lush green moss. All the flowers there were beautiful, perfectly placed, and perfectly planted, to complement one another. Butterflies fluttered about the flowers sipping the sweet nectar from the ones it oozed from like candy. The air smelled sweet, and was filled with pedals that drifted about in the warm days breeze. Tia was sitting there in the soft moss amongst the the beautiful flowers.[else] Esher was standing in the most wondrous garden he had ever saw in his life. It was placed in a small well rounded clearing, sitting on top of a soft later of lush green moss. All the flowers there were beautiful, perfectly placed, and perfectly planted, to complement one another. Butterflies fluttered about the flowers sipping the sweet nectar from the ones it oozed from like candy. The air smelled sweet, and was filled with pedals that drifted about in the warm days breeze. Tia was sitting there in the soft moss amongst the the beautiful flowers.[end if]"

I need the truth state EsherEnteredGarden to change after he enters the garden.

I figured an after rule would produce this, but it didn’t work. With that, and before rule I get the second room description…

Inform has built-in support for checking if a room has been visited before or not, so for that particular purpose you need not create your own truth state.

Just write:

The description of Tia's Garden is "[if unvisited]When Esher stepped out of the thin trail to where Tia was he was met by the most wondrous garden[else]Esher was standing in the most wondrous garden he had ever saw in his life[end if]. It was placed in a small well rounded clearing, sitting on top of a soft layer of lush green moss. All the flowers there were beautiful, perfectly placed, and perfectly planted, to complement one another. Butterflies fluttered about the flowers sipping the sweet nectar from the ones it oozed from like candy. The air smelled sweet, and was filled with petals that drifted about in the warm day's breeze. Tia was sitting there in the soft moss amongst the the beautiful flowers."

Then the first sentence will change according to whether the player has been in the room before or not.

Inform gives every room a Boolean property, stating that it can be visited or unvisited. After the player has entered a particular room for the first time the visited property of that room is set (i.e. it changes from unvisited to visited, i.e. this Boolean changes from false to true).

So, sometimes it can be an alternative to flag things with Booleans that are properties of individual objects, rather than with global Boolean variables.

(If you want to use the EsherEnteredGarden variable, you’d actually have to write an after looking rule! This is because room descriptions are printed by the looking action, whose rulebooks Inform runs as soon as the player enters a room. Indeed the visited property of the room is set by the last carry out looking rule.) After looking in Tia's Garden: now EsherEnteredGarden is true; continue the action.

[if unvisited] :laughing: shows where my brain was at the time. I’ve used that already tons. Too many consecutive coding hours, or something, ahah.

I don’t know if it works in the case under exam, but I try and avoid using the “visited/unvisited” rule and use a lot of "first time"s which are quicker and less problematic.

The description of the IntFiction Forum is "A massive display of power by programmers and geeks who find their life more amusing after a '>' prompt[first time].[paragraph break]Now that you think of it, you are one of those also[only]."

Edit: OUCH. This doesn’t provide an “else” rule, tho.