View Single Post
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old October 15th, 2017, 09:27 AM
What do && and || mean? You'll never see a doubled character as a operator in HL's scripting language. Do you just mean & and |, and you're pulling in terms from another language?

Also, do you want to use booleans with a script, or are you using booleans in a tag expression? The answer is different in each case

If your question is about tag expressions, here's that section of the wiki: http://hlkitwiki.wolflair.com/index....ag_Expressions

For scripts, you'll have to be clever with addition and subtraction and multiplication, because the standard if () then can't take booleans.

But,

if (A + B <> 0) then

ends up meaning A or B, as long as both A and B are things that are false at 0 and true if <> 0, and

if (A + B = 2) then

ends up meaning A & B, as long as both A and B are things that are false at 0 and true at 1 (but in this case, it doesn't work if they can be values > 1).
Mathias is offline   #2 Reply With Quote