• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

[Solved] In GUI, how does it handle having multiple "event response-set damage" triggers?

Status
Not open for further replies.
As title says, like let's say I have 3 different triggers that modify damage with the same event. (using GUI + JASS with the new natives)

1. dmg+200
2. dmg*2
3. dmg-300

Does it gets resolved sequentially according to which trigger comes first?

(Sidenote, another thing I wonder is how would Bribe's damage engine work here alongside the natives, if let's say either the first or last is from Bribe's and the system is located first.)
 
Last edited:
The easiest answer is: Do a quick test with prints and see the order.
I'd guess that Bribe's system should come before any GUI-triggers and before most jass triggers as it is a "library", and vjass libraries puts themselves very early in the final triggers and I'm fairly sure that it runs the first registered code first. Unsure how it is in lua though...

One-line answer: I'm pretty sure that it gets resolved sequentially according to which trigger comes first in the final compiled code, but it'd be a good idea to verify with a few prints to confirm.
 
GUI triggers normally compile in order from top-to-bottom based on the trigger position in the Editor.

Damage Engine events will trigger before generic GUI events, and the data reference between them is mostly "not broken".

If you have Damage Engine, the best formula is to enforce it consistently throughout your triggers. I don't recommend intermingling Damage Engine with the new GUI natives, because it can mess up stuff like lethal damage detection and DamageEventPrevAmt.
 
Status
Not open for further replies.
Top