#simplest way to toggle /tags on and off in dialogues.json

1 messages · Page 1 of 1 (latest)

rare knoll
#

this was supposed to be a button in dialogues.json that allows the player to toggle an ability off and on, but it won't work cause both commands are running in a sequence , any easier way to make it work without having to use a scoreboard?

               {
                  "commands": [
                     "/tag @initiator[tag=qs1,tag=qstag1] remove qstag1",
                     "/tag @initiator[tag=qs1,tag=!qstag1] add qstag1"
                  ],
                  "name": "Telezorp"
               }
civic yew
rare knoll
civic yew
# rare knoll wouldn't that make the same issue but opposite ? it will always remove the tag

You are right, it would take more tags or scoreboards to solve the problem. Try this:

{
  "commands": [
    "/tag @initiator[tag=qs1,tag=qstag1] add true",
    "/tag @initiator[tag=qs1,tag=!qstag1] add false",
    "/tag @initiator[tag=true,tag=qs1,tag=qstag1] remove qstag1",
    "/tag @initiator[tag=false,tag=qs1,tag=!qstag1] add qstag1",
    "/tag @initiator[tag=true] remove true",
    "/tag @initiator[tag=false] remove false"
  ],
  "name": "Telezorp"
}