How to make a toggler?

Discussion in 'Skript' started by Redblock6, Jun 9, 2019.

  1. Hello,
    I was wondering how I could make a toggler? For example, when I do /v it will give me a title "VANISHED" and then you have vanished how do I track when vanished. like when I am not vanished and I vanish i want it to say u are now vanished but when I am vanished I want it to say you are no longer vanished. (btw I am using SuperVanish)

    Best regards,
  2. Code (Text):
    if arg-1 is "true":
        set {vanished} to true
    else if arg-1 is "false":
        set {vanished} to false
  3. better:
    Code (Text):
    if {vanished} is set:
      delete {vanished}
      set {vanished} to true
    • Like Like x 1
  4. Were would I put this in my code?
  5. in command's code
  6. I tried it and it did not work.
  7. We have no idea what you mean. It doesn't do anything unless you add functionality to it. Use the SkUnity Docs or forums.
    • Agree Agree x 1
  8. The most compact way of doing this would be:
    Code (Text):
    set {_toggle} to (true) if {_toggle} is false, else false
    • Like Like x 1

Share This Page