Overview
Conditions are the primary way to use logic in interactions in Play. They let you use a trigger to fire different actions in different circumstances. Conditions are made up of two parts, ‘If’ and ‘Else’, both of which can have their own set of actions. In the If section, you’ll enter an expression that will output a boolean (true or false).

Creating Conditions in Play
In Play, you’ll add a condition in Interaction Mode. They’re all available in the right-side Interactions Panel and can be dragged onto an object or auto-added by double-clicking. You can add a condition to any trigger. You can then add an action or group of actions to each section of the condition.And & Or
You can also check multiple conditions through one condition node using the “and” operator, &&, and the “or” operator, ||. When you use the && operator, all conditions must be true for the expression to output true. When you use the || operator, only one condition out of the list needs to be true to output true. For example, let’s say you’re prototyping an online checkout page with an active sale. If a user buys Object A and Object B, they get 15% off. The condition will check if the quantity of Object A (a variable we’ll created for this example) is greater than one, meaning the user was buying Object A. The condition will also check if the quantity of Object B is greater than one.
Nested Conditions
You may encounter a scenario with more than two potential outcomes from a condition. In this case, you’ll set up the condition like usual, but instead of adding an action to the ‘Else’ section, you’ll add another condition. This condition should have a different expression. You can nest an unlimited number of conditions. For example, let’s say you’re adding interactions a component, and you want a tap trigger to fire a different action depending on the component’s states. In this case, you would use nested conditions.

