Skip to main content

Selecting player talking to npc

Comments

5 comments

  • Thomas Baldauf

    @e

    -1
  • @e isn’t the answer, given that selects all entities? (Or can be specifies down to specific entities).
    I am asking about a mechanism to select the player that is talking with an NPC, in a multiplayer environment. I am not looking to select an NPC.

    0
  • Thomas Baldauf

    Sorry you are right, the correct answer is @p - it interacts with the next player - the player that is closest to the NPC

    -1
  • As mentioned in my initial post, @p isn’t a viable option either, as it selects the nearest player... In a world with 30 students, there is nothing stopping another student standing between player 1 and the NPC, therefor getting caught by the commands executed by the NPC instead.

    The point is, I am asking for a selector that isn’t based on distance, but is actually selecting the player that is talking to the NPC.

    0
  • Chris Fuge
    Beacon of Knowledge

    I have asked for this as well. Same problem with using a button. I wish there was a selector @x or @t to select whoever clicked the button.

    0

Please sign in to leave a comment.