Author Topic: Wrench Events: Multiple variable checks in ONE brick!  (Read 1746 times)

Multiple variable checks in ONE brick!
Yes, that's right. No need for multiple bricks now!

Notes:

This event set-up was designed to check for the variable onRelay.
If you want to change it to onActivate or onPlayerTouch, add a new event.

Enabled   #16   0 Delay   onActivate   Self   FireRelay

Obviously, you can change the input event to whatever.
No other editing of the events is needed to change how it's triggered.

You WILL have to change event numbers in SetEventEnabled though.
This is because I only used a simple setColor to show how it works.
If you have more than just one event per variable check, you'll need more events.





bit..obvious...

Not as much as you'd think.
An ifVariable output triggers all VariableTrue/False, not just the ones below it until the next ifVariable. Most people had to use handler bricks to go around it, however this shows how you can use just one brick to do it. (Even one of the Variable Event creators, if not both, didn't know this prior to me sharing it.)


My Microblock and Blockintosh application used this. Back when I applied.