I'm tearing my hair out over this.
I have an action button which is essentially a toggle. If a variable is 0, it changes it to 1 and does one other function. If that same variable is 1, it instead changes the variable to a 0, and then does the same other function.
I started by creating an action button which sends command 'trigger'. Then i created 2 triggers, one which executes if the variable is a 0, and one which triggers if the variable is a 1.
I think the problem is, BOTH triggers are occurring. I can't figure out how to execute only ONE set of commands. It appears to be executing the triggers one at a time, so it works like this:
Trigger: (Is variable 0?) changes variable to 1
Trigger (is variable 1?) (changes variable to 0)
So a single press of the button will change it, and then change it back (not what I want).
I can't figure out how to execute only ONE of the triggers and prevent the script from continuing. How can I create an If/else statement? I don't think it's possible with triggers.