Skip to main content

How to run code with NPC interaction button

Comments

4 comments

  • Ryan Barrett

    No

    0
  • Hi Marcin Kowalski,

    You could use something like this:

    Hope it helps!

    -1
  • Ryan Barrett

    Hi Cathy, that is not what Marcin is looking for. That's the opposite. Currently it is not possible to execute MakeCode code via commands. There is only the "on message" event, and that is listening for the player to send a message. Marcin is looking for a way to execute agent code with a command block or npc. 

    0
  • Moderator Beacon of Knowledge Super Star

    I tried creating an event handler - waiting for a chat command. The NPC can say the command, but it is said BY the NPC, not by the player, so nothing happens. 

    I don't see an event handler for anything an NPC does. I think NPCs can only run direct commands from the chat window. I think Ryan Barrett has it right.

     

    0

Please sign in to leave a comment.