Jump to content

Recommended Posts

Posted

You can do it with lua pretty easily, however it would depend on what exactly you were checking.

 

The only other workaround would be to spread it out over several triggers.

For A AND (B OR C) AND (D OR E) AND F

Once> B OR C > Flag 1 Increase 1

Once> D or E > Flag Increase 1

Once> Flag 1 = 2 AND A AND F> Do Action

 

For (A AND B) OR C AND (D OR E) AND F

Once> D OR E> Flag 1 On

Once> C AND F AND Flag 1 True OR A AND B> Do Action

  • Like 1

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Posted
The only other workaround would be to spread it out over several triggers.

 

If I'm not mistaken you can do it with just one trigger aswell. The conditions field won't be pretty and it will take time, but AFAIK it should work.

 

We can use equivalence laws or truth table to do some redux and [OR] the results together. If we go for your example 2,

 

2- A AND (B OR C) AND (D OR E) AND F

 

which is

A ∧ (B ∨ C) ∧ (D ∨ E) ∧ F

A and F must always be true, so we can simplify by ignoring them for now, which leaves

(B ∨ C) ∧ (D ∨ E)

which is what we must test for. Through truth table we see that the following combinations make the expression true;

C ∧ E
C ∧ D
C ∧ D ∧ E
B ∧ E
B ∧ D
B ∧ D ∧ E
B ∧ C ∧ E
B ∧ C ∧ D
B ∧ C ∧ D ∧ E

Since we remember A and F must be true we AND in the following to all the subexpressions

A ∧ F

and now we have all the conditions for which the trigger should fire and we [OR] them together.

 

In the ME it will look like so;

A
F
C
E
[OR]
A
F
C
D
[OR]
A
F
C
D
E
[OR]
A
F
B
E
[OR]
A
F
B
D
[OR]
A
F
B
D
E
[OR]
A
F
B
C
E
[OR]
A
F
B
C
D
[OR]
A
F
B
C
D
E

Now I must admit, my boolean algebra is a bit rusty so maybe there's an easier way. But it should work!

 

Also keep in mind I haven't had my morning coffee yet, so if some error has sneaked its way in there or my logic is false then I apologize and hopefully someone will correct me. :thumbup:

 

Whee, that was fun!

  • Like 1
Posted

Don't get me wrong, you certainly can put every possible combination into a trigger condition and it will work. But in this case I think its probably one of those "its not the size that matters its how you use it" scenarios. :)

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Posted
Don't get me wrong, you certainly can put every possible combination into a trigger condition and it will work. But in this case I think its probably one of those "its not the size that matters its how you use it" scenarios. :)

 

lol, well put! I agree, my proposed solution certainly wasn't the most elegant one - but it works :megalol:

Posted
mjeh, reading your post reminded me my math classes back in university. But this was 20 years ago and my courses notes are probably used by now as compost to feed my parent's garden. Thanks however for the very detailed post and the time you spent to answer.

 

My pleasure! I always knew that logic course would be useful one day, I just never imagined it would be in the context of making missions for a flight sim :huh:

  • Like 1
  • 1 year later...
Posted
My pleasure! I always knew that logic course would be useful one day, I just never imagined it would be in the context of making missions for a flight sim :huh:

 

Best brush up on your geometry, too!

 

:smartass:

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.

  • Recently Browsing   0 members

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