Just like loops and case statements, conditions can be simpler when done in OptoScript code. If/then, if/then/else, and if/then/elseif statements can all be mixed and nested as needed.
Here’s an example of a simple if/then/else statement programmed using standard PAC Control commands, and then in OptoScript:
OptoScript is even more useful for more complex conditions, as shown here:
In an upcoming lesson, you'll be programming an if/then/else condition in OptoScript.