Welcome to the forum duke_meister!
“The noun” is only going to be set once the parser has interpreted the command, and the parser has to figure out the scope of the player before it can interpret the command, so that’s why the noun is nothing when you’re doing that. The way to think of it is like this:
In a command like “TALK TO BOB” the parser has to match the word “BOB” against the “[someone]” token. The way it does this is to take the things in scope and see if “BOB” can be understood as any of them. So what we want to do is not place Bob in scope–the parser doesn’t know what “BOB” means yet–but to expand the number of things that the parser will check against the word “BOB.”
So the logic you want is that you want to put everything on the other side of “current” in scope. If Bob is one of those things, then the parser will be able to find Bob. Fortunately, there’s a quick way to do that–if we “place the contents of [some room] in scope” it will put everything in that room in scope in one fell swoop. (“Place foo in scope” also places the contents of foo in scope by default, but in this case we don’t necessarily want to place the room itself in scope, as players can’t usually refer to rooms in their commands.)
So we can do this;
[code]Talking to is an action applying to one visible thing.
Understand “talk to [someone]” as talking to.
Report talking to: say “You have nothing to say to [the noun].”.
After deciding the scope of the player while talking to:
repeat with current running through doors in location:
if the other side of current is a room: [checking for deadend doors]
place the contents of the other side of current in scope.
Central room is a room. Eastern room is a room. Western room is a room. Southern room is south of Central room. Southwestern room is west of southern room.
The oak door is a door. It is east of Central room and west of eastern room.
The maple door is a door. It is west of central room and east of Western room.
The steel door is a door. It is north of southwestern room and south of western room.
Alice is a woman in Eastern room. Bob is a man in Western room.[/code]
Another couple of notes:
Usually these rules are written as “after deciding the scope of the player”–that all takes place before parsing so it’s fine. I’m not sure whether doing “before” makes a difference. But you need to say “while talking to” instead of saying “while talking to someone”–at this point the noun isn’t set, so you aren’t actually talking to someone yet!
“The other side of current” is a room. You don’t want to say “on the other side of current” because that will check whether something is on the room, in the way it can be on a supporter, and that will always be false. If you’re doing that check you probably want to check “enclosed by the other side of current”; “in the other side of current” would be only things directly in the room, not things on supporters in the room etc. (But you don’t actually need this, since placing the contents of the room in scope takes care of everything.)
I didn’t include any logic about the door being open. I think maybe you meant “current is open and…” not “or”? Anyway, if you want to restrict it to open doors, you can make the loop run through “open doors in location.”
Also I didn’t test the code with Simple Chat, so I’m not sure if it works with that!