I did something like that !
Sorry for the delay, this took longer than expected as I had to make my own Stack (with textmacro):
Stack v1.0.1
Which needed its own LinkedList:
LLMod v1.0.0
And allocation:
Alloc v1.0.0
So yeah, here's the current library:
Attackers v1.0.2
How you like it, is there something to change?
And if you spot something I'll ofc add you in the credits
EDIT: Updated the pastebin links, it seems like it doesn't work that well, GetUnitAttackers() will return too high numbers, even though I debugged it and it says it forgets them as attackers :/
I'll create it from scratch for the 4th time tomorrow, atm I'm fucking tired of this thing...
I'll just need to approach it from different angle I guess... *sigh* wasted 4 hours creating those shits
EDIT2: I think I got it to work! I just had to redo it four times