() or ()

From PenguinMod Wiki (Official)
Jump to navigation Jump to search

The () or () block is a boolean block that reports true if either or both of the booleans are true, and false otherwise. It originates from Scratch.

Workaround

This block can be worked around by using the () + () and the () > (), detecting if the sum of the booleans is greater than 0 (as false is 0 and true is 1 when operations are used in Scratch):

define <boolean 1> or <boolean 2>
return <<<boolean 1> + <boolean 2>::operators> > [0]>::custom cap

Or by detecting if both booleans are equal to false with the () and () as well as the () = () block:

define <boolean 1> or <boolean 2>
return <not <<<boolean 1> = [false]> and <<boolean 2> = [false]>>>::custom cap

It can also be replicated by putting a () nor () block in a not () block:

define <boolean 1> or <boolean 2>
return <not <<boolean 1> nor <boolean 2>::operators>>::custom cap

See also