Jump to content

Request a new TRIGGER type 'REPEAT UNTIL ALL TRUE'


Recommended Posts

Posted

1. Create a trigger of this new type.

2. In the CONDITIONS box, list condition groups separated by an OR.

3. In the ACTIONS box, put in the actions that will occur EVERY TIME ANY OF THOSE 'OR'D' CONDITIONS ARE MET.

 

i.e.

TRIGGER

  • Trigger 'REPEAT UNTIL ALL TRUE'

CONDITION

  • Unit Dead (A)
  • OR 
  • Unit Dead (B)
  • OR
  • Unit Dead (C)

ACTIONS

  • Increase Flag (Troops Lost, 1)

 

This will increase the 'Troops Lost' flag value by ONE EACH TIME one of those three conditions are true, but after each one is true, that is removed from the condition list. So this will only ever increase the flag by 3 (assuming all 3 units have died)

 

Posted

IMHO at issue here is ME's inherently ill-designed (from a user perspective) trigger structure which isn't well explained, severely restricts mission builders, and harkens from a time of restricted resources and UX wasteland. Triggers implicitly are always loop constructs: the type of loop is (quite unintuitively, unnecessarily restrictive, and using some highly obscure 'DONOT .. WHILENOT' format) encoded in the Trigger Type and the expression (when) this happens is in the Condition Type. From that aspect, basic programming structures like while, repeat, for are put into the trigger, and the expression when into condition. 

That's why there will be no "repeat" condition - that's the loop type, and it's encoded via  "Repetitive Action'.  

Plus, don't get me started on the way Conditions (don't) work. It's not clear how multiple conditions are worked through, nor what operator has precedence: What does the following example represent in normal logic

  • Unit Dead (A)
  • OR 
  • Unit Dead (B)
  • AND
  • Unit Dead (C)

Which would that be

  • [Unit Dead (A) OR Unit Dead (B)]   AND     Unit Dead (C)
     
  • Unit Dead (A) OR    [Unit Dead (B) AND Unit Dead (C)]

Unclear. Disastrous for your mission if you assume wrongly.

ME's conditions should only be used for quick, simple fixes. Anything else pretty much requires Lua (to preserve the mission designer's sanity). Don't get me wrong. Yes, I know that theoretically, ME Triggers are Turing-Complete ("Repetitive Action", which is DO..WHILE, takes care of that). But that doesn't mean that it's easy to use - it's merely theoretically capable of implementing any algorithmic problem. ME's trigger system has GIGANTIC usability issues. 

I'm hoping that ED opens up ME's API for people so the community can build better tools to take care of that (some visual programming tools perhaps? Although I'm no friend of visual programming myself I know that many mission designers would love that - and it can't really get worse now, can it 🙂 )

  • Like 3
  • Recently Browsing   0 members

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