Description
Returns true only if both conditions are true. In case of the alternative syntax, lazy evaluation is used - if left operand is false, evaluation of the right side is ignored.
Syntax
Syntax 1
a and b
Parameters:
Returns: Boolean
Syntax 2
since arma2oa 1.62
a and b
Parameters:
a: Boolean - test condition or variableb: Code - code that returns Boolean. It is not evaluated if a is false
Returns: Boolean
Examples
Example 1
if ((not isNull player) and (alive player) and (_enemycount == 0)) then
{
hint "you win !";
};
Example 2
if ((count _array > 0) and { (_array select 0) == player }) then // works as expected
{
hint "It works!";
};
if ((count _array > 0) and (_array select 0) == player) then // Error: _array select 0 is evaluated
{
hint "It... works?";
};