JHzlwd Posted March 5, 2013 Posted March 5, 2013 I have used the Mission Builder a lot and am mostly comfortable with it but having a problem with one of the elements. Suppose I have a trigger and under "Conditions" I specify: UNIT INSIDE MOVING ZONE(KLINDAR, SHIP-MOVINGZONE) FLAG IS TRUE (1) [OR] GROUP ALIVE (GROUP-02) I am Klindar. Now envision me flying my Ka-50 into that moving zone. My understanding is that this should happen: If FLAG 1 is true then the trigger is tripped regardless of the state of GROUP-02. OR Regardless of the state of Flag 1, the trigger is tripped if GROUP-02 is alive. If I leave out the "[OR]" and "GROUP ALIVE (GROUP-02)" lines the trigger behaves as expected based on the state of FLAG 1. If I have those two lines in there conditions for the trigger to trip are NOT satisfied if GROUP-02 is still alive, regardless of state of FLAG 1. (I have tested this carefully and confirmed GROUP-02 is alive.) This is the first time I have attempted using [OR] so, perhaps, I misunderstand its function. Any suggestions appreciated. I7-2600K@4322 MHz / Asus P8Z77 Deluxe EVGA GeForce1080 SC Video Samsung EVO 850 SSD / Dell U2711 monitor@2560X1440 Saitek X55 "Rhino" / Logitech G510 Win 10 Pro 64 bit
Wrecking Crew Posted March 5, 2013 Posted March 5, 2013 Try this - UNIT INSIDE MOVING ZONE(KLINDAR, SHIP-MOVINGZONE) FLAG IS TRUE (1) [OR] UNIT INSIDE MOVING ZONE(KLINDAR, SHIP-MOVINGZONE) GROUP ALIVE (GROUP-02) WC Visit the Hollo Pointe DCS World server -- an open server with a variety of COOP & H2H missions including Combined Arms. All released missions are available for free download, modification and public hosting, from my Wrecking Crew Projects site.
JHzlwd Posted March 5, 2013 Author Posted March 5, 2013 Well, that is very interesting indeed - grouping the "AND"s in that way. I will try later today and report. Thanks. I7-2600K@4322 MHz / Asus P8Z77 Deluxe EVGA GeForce1080 SC Video Samsung EVO 850 SSD / Dell U2711 monitor@2560X1440 Saitek X55 "Rhino" / Logitech G510 Win 10 Pro 64 bit
St3v3f Posted March 5, 2013 Posted March 5, 2013 (edited) From the mathematical / logical point of view, an OR expression is true if either or both sides of it are true. That means that as long as the group is alive, the expression is true, regardless of the flag or the units location. You can compare it with multiplication / division and addition / subtraction. AND is the multiplication (it's evaluated with a higher priority) while OR is the addition and evaluated with a lower priority. Or: Exp1 AND Exp2 OR Exp3 equals (Exp1 AND Exp2) OR Exp3 not Exp1 AND (Exp2 OR Exp3) Hope that clears it up a bit Edited March 6, 2013 by St3v3f aka: Baron [sIGPIC][/sIGPIC]
JHzlwd Posted March 5, 2013 Author Posted March 5, 2013 One must also beware the distinction between OR and EXCLUSIVE OR, the latter returning FALSE if both (or all) operands are TRUE. Anyway, the Mission Builder Guide is getting a bit behind the new features that keep getting added. I7-2600K@4322 MHz / Asus P8Z77 Deluxe EVGA GeForce1080 SC Video Samsung EVO 850 SSD / Dell U2711 monitor@2560X1440 Saitek X55 "Rhino" / Logitech G510 Win 10 Pro 64 bit
JHzlwd Posted March 5, 2013 Author Posted March 5, 2013 Thanks again to folks responding. Packaging the conditions as suggested by "Wrecking Crew" does the trick. Everything working now. I7-2600K@4322 MHz / Asus P8Z77 Deluxe EVGA GeForce1080 SC Video Samsung EVO 850 SSD / Dell U2711 monitor@2560X1440 Saitek X55 "Rhino" / Logitech G510 Win 10 Pro 64 bit
Home Fries Posted March 6, 2013 Posted March 6, 2013 So OR statements are essentially top level statements, with all AND statements effectively grouped in parenthesis? In other words: UNIT INSIDE MOVING ZONE(KLINDAR, SHIP-MOVINGZONE) FLAG IS TRUE (1) [OR] UNIT INSIDE MOVING ZONE(KLINDAR, SHIP-MOVINGZONE) GROUP ALIVE (GROUP-02)means [[uNIT INSIDE MOVING ZONE(KLINDAR, SHIP-MOVINGZONE)] AND [FLAG IS TRUE (1)]] OR [[uNIT INSIDE MOVING ZONE(KLINDAR, SHIP-MOVINGZONE)] AND [GROUP ALIVE (GROUP-02)]] -Home Fries My DCS Files and Skins My DCS TARGET Profile for Cougar or Warthog and MFDs F-14B LANTIRN Guide
mjeh Posted March 6, 2013 Posted March 6, 2013 (edited) So OR statements are essentially top level statements, with all AND statements effectively grouped in parenthesis? For the purpose of the Mission Editor alone it would be useful to think of it in those terms, but I would discourage it as it carries implications that are false in many other situations. AND and OR (conjunction and disjunction, respectively) are connectives used to form compositional propositions (or statements if you will) from simpler propositions. Parenthesis can be put around an OR-statement just as easily as around an AND-statement, and have the potential to completely change the meaning of the composite statement depending on their placement. '(P and Q) or R' is not equivalent to 'P and (Q or R)' as was already explained by St3v3f, because the first statement means that "either 'P and Q' must be true, or 'R' must be true" whereas the second means "'P' must be true and either 'Q or R' must be true" (You'll have to forgive me if I mix up terminology, as english is not my first language. If I made an error, hopefully someone in the know will be kind enough to point it out) In other words: UNIT INSIDE MOVING ZONE(KLINDAR, SHIP-MOVINGZONE) FLAG IS TRUE (1) [OR] UNIT INSIDE MOVING ZONE(KLINDAR, SHIP-MOVINGZONE) GROUP ALIVE (GROUP-02)means [[uNIT INSIDE MOVING ZONE(KLINDAR, SHIP-MOVINGZONE)] AND [FLAG IS TRUE (1)]] OR [[uNIT INSIDE MOVING ZONE(KLINDAR, SHIP-MOVINGZONE)] AND [GROUP ALIVE (GROUP-02)]] Yes, this is correct. The AND is implicit from the grouping of statements. Edited March 6, 2013 by mjeh
Recommended Posts