[Solved] Syntax for combinations of AND/OR conditions
Posted: Mon Jun 03, 2024 5:48 pm
Hi Tony
I was wondering if there is a valid syntax for checking a mix of AND/OR conditions in a single entry?
For example if I wanted to check (pseudo code):
i.e. This entry is valid if both A and B are true. This entry is also valid if C is true (regardless of the state of A or B)
At the moment I would do this using two different entries:
Both entries would have a Continue() sequence and link to the same dialogue entry for the text I wanted to display in this situation.
If I could achieve this check in a single entry that would be helpful. I wondered if it's possible to use brackets to wrap sets of conditions in but I haven't been able to get this to work so far. For example:
Thank you
Tom
I was wondering if there is a valid syntax for checking a mix of AND/OR conditions in a single entry?
For example if I wanted to check (pseudo code):
Code: Select all
If (A == true and B == true) OR (C == true)
At the moment I would do this using two different entries:
Code: Select all
Variable["A"] == true and (Variable["B"] == true)
Code: Select all
Variable["C"] == true
If I could achieve this check in a single entry that would be helpful. I wondered if it's possible to use brackets to wrap sets of conditions in but I haven't been able to get this to work so far. For example:
Code: Select all
((Variable["A"] == true) and (Variable["B"] == true)) or (Variable["C"] == true)
Thank you
Tom