Hello, I'm currently making a mod, and working on a behavior called "Duelist", which is obtainable by pretty much any unit.
Its mechanism would be simple: its owner deals 30% more damage to the closest enemy within radius of 7, and takes 30% less damage from the furthest enemy within same radius.
I've made it to search area and apply each dummy behaviors to closest&furthest enemies, but here's the problem: different Duelist units of same player may deal additional damage to closest enemy of other Duelist units, and vice versa. That's not what I want.
I know that marker may be key, but idk if you can utilize marker to make what I want work here. I've tried it several times(not fully understanding how it works), but failed.
Can someone please tell me if this is achievable with data? And if so, how can I do that? Thanks.
P.S. I think I have grasp of way to make it work with triggers, but I don't want to have triggers that happens whenever a unit takes/deals damage because that would make my mod even more laggy.
Can you please elaborate? I looked into it but I don't see the way to implement it.
If I wasn't being clear, I have no problem of getting closest&furthest enemy around Duelist every certain seconds. I just can't distinguish which Duelist marked which unit when there are more than 1 Duelist.