ADHS Posted February 23, 2022 Share Posted February 23, 2022 (edited) Hello. Seems the OR condition is not acting as i was expected: IF, this OR this OR this ...^N --> then. In my test, i am checking the FLAG 1. Every 5 seconds is changing from 0 to 1 (for 30'). And whenever is changing, a message pop ups. While the individual checks are working: SWITCHED COND --> condition:FLAG VALUE = 1,0 --> action: MESSAGE TO ALL SWITCHED COND --> condition:FLAG VALUE = 1,1 --> action: MESSAGE TO ALL once i am trying to squeeze both in one pass (using OR) it fails: SWITCHED COND --> condition:FLAG VALUE = 1,0 condition:OR condition:FLAG VALUE = 1,1 --> action: MESSAGE TO ALL Am i miss something ? or it is a bug ? Thank you. check-OR-01_Just DCS.miz Edited February 23, 2022 by ADHS Democracy was already invented, while Scrat was eating oak fruits. Link to comment Share on other sites More sharing options...
Solution toutenglisse Posted February 23, 2022 Solution Share Posted February 23, 2022 32 minutes ago, ADHS said: ...once i am trying to squeeze both in one pass (using OR) it fails: SWITCHED COND --> condition:FLAG VALUE = 1,0 condition:OR condition:FLAG VALUE = 1,1 --> action: MESSAGE TO ALL Am i miss something ? or it is a bug ?... You cannot switch OFF with these settings. The flag can only have value 1 or 0 so it never reach a value that switch the trigger OFF. It is always ON. And as the conditions are true from start the trigger does nothing. For the trigger to work you need to switch from a false condition to a true condition. (example : from any value except 1 or 0 to value 1 or 0) 1 Link to comment Share on other sites More sharing options...
ADHS Posted February 23, 2022 Author Share Posted February 23, 2022 (edited) toutenglisse thank you for your answer. I didn't knew that 0 and 1 were reserved for just true or false! I thought that they were available to use as general numerics. Conclusion: Is not ME's bug, set the FLAG to OFF (after every check, ACTIONS) for the next check to work properly. Thank you again. PS: I am uploading the mission so anyone with same question to check the flow. WORKS_OR condition-01.miz Edited February 25, 2022 by ADHS Democracy was already invented, while Scrat was eating oak fruits. Link to comment Share on other sites More sharing options...
toutenglisse Posted February 23, 2022 Share Posted February 23, 2022 You can use 0 or 1 as flag value in the switched trigger's conditions there is no issue with that. (But yes, when you set a flag true it automatically gets value 1, and when you set it false it gets value 0. But any value > 0 makes the flag true, not only value 1. A flag with 150 as value is a "true" flag) The issue in your example is that the flag only changes from value 0 to 1 every 5 seconds, and these two values are both valid conditions for trigger (flag 1 value 0 OR flag 1 value 1), so the trigger is always ON and can't get OFF. To work the trigger needs conditions to switch from OFF/false to ON/true. if conditions are always true (or false) there is no switch detected and no actions. Link to comment Share on other sites More sharing options...
ADHS Posted February 24, 2022 Author Share Posted February 24, 2022 (edited) 11 hours ago, toutenglisse said: The issue in your example is that the flag only changes from value 0 to 1 every 5 seconds, This was just a wrong simple test loop, so me to check if OR works and if it reaches the actions section. Based on this working condition check, now a script in actions section, is checking groups/units/flags and make actions. You solve this one my friend and thank you very much. PS: Check the above uploaded mission to see the flow. It was very simple, after your HELP. Edited February 24, 2022 by ADHS Democracy was already invented, while Scrat was eating oak fruits. Link to comment Share on other sites More sharing options...
toutenglisse Posted February 24, 2022 Share Posted February 24, 2022 Yes it works well the way you did 1 Link to comment Share on other sites More sharing options...
ADHS Posted February 25, 2022 Author Share Posted February 25, 2022 (edited) An addition: Once checking the FLAG 1, just for NUMERIC VALUES of 2,3,4,5 a condition like FLAG LESS THAN < 6 FLAG MORE THAN > 1 can replace a long OR list. (and saves you a lot of clicks) But if the conditions includes events and numerics, the above solution will work with OR list of events + this one as a headline. Edited February 25, 2022 by ADHS Democracy was already invented, while Scrat was eating oak fruits. Link to comment Share on other sites More sharing options...
Recommended Posts