Here’s something else I’ve come across, using Simple Chat, I can’t figure out how to enable it so that you talk to an NPC who isn’t in the room with you, they are on the other side of a door. The following code doesn’t work, and I’m not sure how to properly phrase it so that the game understands??? Has anyone else had to do something like this before?
[code]Chat-hello-NPC, chat-what-ru-doing are chat nodes.
Instead of talking to NPC when the player is the Upper Hallway and the NPC is in the Other Room: run a conversation from chat-hello-NPC.
Report giving text for chat-hello-NPC: instead say "Hey, you in there?' You say, rattling the door.".
Carry out finding responses to chat-hello-NPC: link to chat-what-ru-doing.
Report giving link to chat-what-ru-doing: instead say "'What are you doing in there?' ".
Report giving text for chat-what-ru-doing: instead say "'Busy. Be out in a minute.'[line break]".
Carry out finding responses to chat-what-ru-doing: try finding responses to chat-hello-NPC instead.[/code]
The best way to do this would be to define your talking action like this.
Talking to is an action applying to one visible thing. Understand "Talk to [any thing]" as talking to.
This will allow you to talk to anyone (or anything) in the game regardless of where they are. You can then add check rules to stop the player talking to things and people who the player should not be able to talk to.
If you want the player occasionally to speak to someone in another room, you need to define the talking to action as applying not to one thing but to one visible thing.
Talking to is an action applying to one visible thing.
(“Visible” is an obvious misnomer in this context. What it really means is that the player need not be able to touch the thing; if he can see it or not actually doesn’t matter.)
Then you also need to place the relevant NPC inside the scope of the player under the relevant conditions:
After deciding the scope of the player when the player is in the Upper Hallway and the NPC is in the Other Room: place NPC in scope.
Changing the definition of talking to and adding the after deciding the scope rule should do the trick.
EDIT: Oops! I see climbingstars already presented the other solution. I guess it’s mostly a matter of taste which to use.
Thank you both, @Felix - where would I put the “scope” suggestion, right now, I can talk to the NPC behind the door, but when the NPC leaves that room, and I am still in the upper hallway, I can still talk to the NPC even though they are not in the room anymore.
So I need to figure out a way that will shut down that conversation node once the NPC leaves that room…
Perhaps you have combined the two solutions in this thread?
If you do it the first way:Talking to is an action applying to one visible thing.
Understand "talk to [any thing]" as talking to. – then the player can talk to anyone anywhere by default, and you have to prevent the player from talking to people he/she shouldn’t be able to talk to (by means of instead or check rules).
If you do it the other way:Talking to is an action applying to one visible thing.
Understand "talk to [something]" as talking to. – then the player can talk to people that is not in the same room with him/her, provided that you explicitly put those people in scope for the player with an after deciding the scope rule.
The first way overrides the second, so if you have defined your action and command that way, the default is that anyone anywhere is automatically in scope for the player to talk to whether or not you have explicitly said so.