Snippet Trigger

Nestharus

o-o
Reaction score
84
runs the conditions on the trigger.


Remember, a trigger is made up of 2 parts-
Conditions
Actions

Events aren't part of the trigger though. When a trigger is registered with an event, it actually creates an event object and adds that object to a list of events and then adds that trigger to the event object it created = |.

Let's say a unit dies. After that death code is finished running, it will go through an event list and fire off each event. Each event will first evaluate its filter and then it will evaluate the trigger and then execute the trigger.

Code:
if (filter) then //in event
    if (evaluate) then //in trigger
        execute trigger //in trigger

So in this order-
Code:
Unit died
    set the properties etc

    evaluate events
        if filter, evaluate trigger
            if condition, execute trigger
                execute trigger

Now this is based on the fact that event handles are created whenever a trigger is registered to an event, that triggers are run in order (queue), that some events have filters (not the triggers), and that JASS includes BJs for conditionally running a trigger that follow in the above layout.
 

Romek

Super Moderator
Reaction score
963
In order to save a single, empty trigger evaluation, you made adding and removing triggerconditions require two hashtables, some hashing of sort and multiple variables and checks? I'd understand if empty trigger evaluations caused crashing, BSODs, unimaginable lag, and some other forms of e-torture... But they don't.

Is this a joke?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top