how to reduce coupling

there is a player character and a door.i want this door opened with pressing e.
now i have three ways to improve this logic:
1.player have a event dispacher and when press e ,call this dispacher.door hold a reference to player and implement its dispacher with opending door logic at event start
2.when player’s trace function detected door , it use this door’s reference and call its opening function
3.door inherit a interface named “what should this actor do when pressing e”.player press e ,call this interface

should i use dispacher?is it the best way?
i dont want there is tomuch code or some specific actor appear in playerblueprint
someday i wish i can pick up an apple or do something else with e pressing and less editing to playerblueprint

The way you want it ( drum roll… ) blueprint interface :slight_smile:

Two problems with dispatchers

  1. They are meant for one to many comms

  2. Thet are not decoupled

Interface is the way…