Hi, thanks for reading my post! I'm wondering if anyone can shed some light on the OR expression using the pipe |.
I know that we can make an or block inside of a condition, for example, using "health" as a global variable:
[quote:z7vo2xe1]If health = 8
OR
If health = 7
--> Display 4 hearts on HUD
But I'm looking at the OR expression and trying to figure out what's different about it. Take the same instance as above, but with:
[quote:z7vo2xe1]If health = 7|8
--> Display 4 hearts on HUD
This second expression, at least from what I'm reading, should return 4 hearts on the HUD if either condition is true, i.e., if hearts are 7 OR hearts are 8. However, I've found that this second example doesn't do anything, so I'm assuming that this pipe expression is actually different from using an OR block in the condition. The construct manual says
[quote:z7vo2xe1]| is a logical OR operator. These are useful combined with the comparison operators, e.g. score < 0 | health < 0, which also return 1 if true and 0 if false.
so it sounds like I can get this result using "compare 2 variables" in the system conditions as well, but not the way the second example is shown above.
Thank you!