You can send values through an interface, if you want. It’s really up to you. I think if you ask anyone about this stuff you will get a different answer. It depends on so many things. A standard way of getting actor references is a line trace from the player. But if actor A always needs to know about actor B, then just use an actor reference variable, and set it in the level.
This is my NPC
Then, in the level
That’s one way.
Another method, the way I do it, is with the save game. Take your example
1 Talk to NPC
2 Leave apartment
3 Buy something
4 Come back
Every actor has variables that are useful to it, and can write them and read them to/from the save game.
If I try to leave before talking to the NPC, the door checks its variables and sees its status is ‘NPC’, and says, ‘is there something you need to ask the NPC?’
When I interact with the NPC, it can write ‘Shopping’ to the save game, as the door’s status.
Now, when I try to open the door, it sees its status is ‘Shopping’ and lets me out.
But if I try to come back in, it won’t let me, because I have not been shopping. A message can appear like ‘Don’t you need to go shopping?’
So I go to the shop, and I buy some toothpaste ( or whatever ), when I pickup the toothpaste, it writes ‘Shopping done’ to the save game as the door’s status.
I go back to the apartment, and the door will let me in.
Using the save game like this is cool in two ways
1 If the player quits the game before the whole scenario is complete, we still know how far we got ( storing the player location works the same way ).
2 It’s a bit like passing status values between the actors, but we never actually had to do it
I use the save game like this in the game I’m currently writing. Its covered all simple story scenarios so far.