The agent cannot push buttons, open doors, traps or gates, or switch levers. But it can use pressure plates. Pressure plates can open doors, gates and traps. Pressure plates can trigger command blocks. And after some trial and error I found out how command blocks can execute your MakeCode commands. Here is how:
1. Make your code using "on tell command". If you already have made a command using "on chat command" you can copy the exact code into an "on tell command" and even use the same name.
2. In your command block, trigger the command like this: "/tell @p commandname"
This way you can execute your code when a pressure plate is triggered by yourself, your agent, mobs or other players.
Please sign in to leave a comment.