i’m back again, this is a super simple request and i’m honestly not sure how i didn’t easily find the answer. i basically want to do a instead of command, do this and make it room specific.
specifically, im trying to give a player a different message when going south, but only when they’re in a specific room. how would i go about this?
I’m sure it can be, yes. To be clear, are you trying to stop someone from going south when the room to the south is unvisited? Or just give a one off message then let them proceed?
im trying to give them a different message if the room theyre currently in has never been visited, and then a different one once they leave and come back
The problem with this model is that once the player is in a room, that room has been visited. It would probably work better to use [if the player is in the kitchen for the first time]. That phrase and its use is documented here.
For posterity, there a few other solutions that might help you solve related problems:
[if the kitchen was unvisited] fires only once. [if the player is in the kitchen for the first time] will fire every time you are in the kitchen for the first time, before you move out.
you can define a specific truth state, though this creates a coding/testing problem if you have multiple places where you see different stuff the first time in the kitchen. A use case might be if you use an out-of-world command after entering the kitchen, but you don’t want to see first-time text. Then I believe the two pieces of code above would not work.