M
Maximus
Guest
How do logical expressions work in GML? For example, with an if statement like this:
if the first expression evaluates to be false, will the second expression be evaluated or just skipped over?
If <expression2> was particularly taxing to evaluate, and <expression1> is rarely true, then should I make it a nested if statement or is this unnecessary?
Code:
if ( <expression 1> && <expression2> )
{
// do something
}
If <expression2> was particularly taxing to evaluate, and <expression1> is rarely true, then should I make it a nested if statement or is this unnecessary?
Code:
if ( <expression 1> )
{
if ( <expression2> )
{
// do something
}
}
Last edited by a moderator: