Trigger Evaluate & Execute

Ayanami

칼리
Reaction score
288
Is there a difference between the two? Well, from my guess, Trigger Evaluate would be better? I mean if I use the "Condition" as my "Action", Trigger Evaluate would be faster, right? Just need someone to clarify this. Thanks!
 

Sevion

The DIY Ninja
Reaction score
413
If memory serves Evaluate checks the conditions and returns a boolean on whether it should fire actions or not.

Execute will fire all of the actions in separate threads per action.
 

Troll-Brain

You can change this now in User CP.
Reaction score
85
Both open a new thread (and so halt the previous one, since jass doesn't support multi-threads).
But TriggerEvaluate is faster, plus you don't need to remove a trigger-condition when you destroy a trigger, you will have to remove a trigger-action if you destroy a trigger, else you will leak the action (TriggerClearActions only disable actions but doesn't free the memory)

Just be aware that obviously you can't use TriggerSleepAction and so also PolledWait in a trigger condition for an obvious reason (which is in most cases hardly a con).
I believe you can't also use some few functions in a trigger condition, such as PauseGame if i remember correctly.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top