why did devs do it like this??Takes Damage is a "Specific Unit Event" not a generic. I believe this is one of the major reasons why something like Bribe's damage system is so valuable. It is able to keep track of all the units and their damage events.
I reaaaallly don't wanna use stuff I don't understand and don't have time to learn coding rnThat's why Bribe's Damage Engine is so highly recommended. It handles all this for you and lets you use "generic" damage taken events in your triggers.
Well, that's worryingOk, apparently even though it is not allowed to use variables in event, you can use them by adding them through trigger - add event
I have to spend some time polishing (auto-adding summoned units, among other things) this but it did figure out the killer properly
I reaaaallly don't wanna use stuff I don't understand and don't have time to learn coding rn
local trigger trig = CreateTrigger();
TriggerRegisterAnyUnitEventBJ(trig, EVENT_PLAYER_UNIT_DAMAGING);
TriggerAddAction(trig, UnitDealtDamage);
local trigger trig = CreateTrigger();
TriggerRegisterAnyUnitEventBJ(trig, EVENT_PLAYER_UNIT_DAMAGED);
TriggerAddAction(trig, UnitWasDamaged);