Jump to content

SGTbayk47

Recommended Posts

Hi,

 

I am wondering what the difference between the AND and OR tags for conditions. Neither one seemed to make a difference for me.

 

For example, I have a dialogue topic that only shows up when the stage of a quest is less than 25, but I also want to add a condition to make it not show up when the stage is 30.

I added the condition, Getstage Quest != 30, but nothing happened. I tried the condition set to both AND and OR but that didn't seem to make a difference either.

 

Any answers will be appreciated.

Link to comment
Share on other sites

"I have a dialogue topic that only shows up when the stage of a quest is less than 25, but I also want to add a condition to make it not show up when the stage is 30."

 

GetStage MyQuest < 25

If you are talking about the same quest in both cases, the second one would be redundant

Link to comment
Share on other sites

They are logical operators used to express complex conditions. Check out this Wikipedia article on the subject. It's not GECK specific and it's a little techical.

 

 

With AND, both conditions must be true for the conditions as a group to be true.

Examples (I've used numbers to illustrate):

1 == 1 AND 1 == 1 returns true
1 == 1 AND 1 == 0 returns false
0 == 0 AND 0 == 0 returns true


With OR, only one of the conditions have to be true.

Examples:

1 == 1 OR 1 == 0 returns true
1 == 0 OR 1 == 1 returns true
1 == 1 OR 1 == 1 returns true
1 == 0 OR 1 == 0 returns false

As you can see, it will also return true if both conditions are true.



You can mix AND and OR however you like. In these cases, OR takes precedence and will be evaluated first.

You can imagine inserting parantheses - like in complex math expressions - to help see how the expression will be evaluated, so this:

1 == 0 AND 1 == 1 OR 1 == 0 AND 1 == 1

is the equivalent of:

1 == 0 AND (1 == 1 OR 1 == 0) AND 1 == 1 returns false
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...