The () and () block is an Operators Block and a Boolean Block. The block joins two boolean blocks so they both he to be true to return true. If they are both true, the block returns true; if only one is true or none are true, it returns false.
This block can be stacked inside itself, which can be used to test more conditions.
Example UsesThis block is used for checking if two or more conditions are true at the same time. Some cases of this are:
Lose health if "I'm touching the fire and I do not he my shield up." forever if then change [lives v] by (-1) Say a button is clicked if the mouse is touching it and the mouse is down. forever if then say [a button is clicked] end end Checking if the final level has been beaten and the player has enough points forever if > :: control C say [Congratulations! You beat the game!] for (5) seconds stop [all v] Workaround Main article: List of Block WorkaroundsThis block can be replicated with one of the following:
not set [and v] to [false] if then if then set [and v] to [true] end endThis works since false booleans are evaluated as 0, and true booleans are evaluated as 1.
See Also () or () Truth tables v • d • eOperators Blocks () + () • () - () • () * () • () / () • Pick Random () to () • () < () • () = () • () > () • () and () • () or () • Not () • Join ()() • Letter () of () • Length of () • () Mod () • Round () • () of ()More blocks...