If we want to randomly select a boolean value, we can use the world’s ‘choose true’
function (called boolean.next in some versions of
1) set the value of ask using the choose true function and
selecting 50% for ‘probability of true’.
The
o ask set value to choose true .5 (50%) of the time
o
2) Use ask as the condition in an if-else statement
As an example, see this Demo and Code.