Do something if condition in reaction is not accomplished?
Hello,
maybe I’m overlooking something simple, but for now I don’t see a solution how to solve this…
In reactions there are what we listen. Next, if “condition” is accomplish then we do something. But I do not see how to add something to do if condition is not accomplished?
For example:
We listen: Button1 is pressed.
Condition 1: if “parameter X” is 0 then we do:
xxxx
xxxx
127 —> “parameter X”
xxxx
and if i put in “next bolck” condition (in same reaction):
Condition 2: If “parameter X” is 127 then we do:
xxxx
xxx
xxxx
this parameter is alredy changed in codiotion before and bought conditions will be exercuted with same reaction.
I try to sepateate these conditipns in two reactions, and get the same results.
More precisely what I’m trying to do.
Once the button is pressed turn on LED for this button and do something…
Then when this button is pressed again turn off LED for this button and do something else…
Recap
Am I getting this right?:
- Action Block 1 only fires when “Parameter X” is equal to 0
- Change “Parameter X” to 127
- Action Block 2 only fires when “Parameter X” is equal to 127
You don’t want Action Block 2 to fire after Action Block 1 fired.
Solve
You can solve this by adding an Action to Action Block 1 that Exits the Reaction.
Menu path = “Script” >> “Exit the Reaction”
Now your Reaction should work like this:
- Action Block 1 only fires when “Parameter X” is equal to 0
- Change “Parameter X” to 127
- Exit the Reaction
- Action Block 2 only fires when “Parameter X” is equal to 127
Sign up
User registration is currently not allowed.