This snippet by Edo might help you: http://www.hiveworkshop.com/forums/submissions-414/snippet-getkiller-228185/#post2270464
http://www.hiveworkshop.com/forums/world-editor-help-zone-98/hero-kill-assist-249813/
maybe watch other threads
Well, if you use a damage detection system you can track damage done by heroes to other, enemy heroes, and maybe reset these records after 60 secs of no combat. When unit dies, check all damaging heroes ( stored in an unit array ) and their respective damage ( stored in a real array ) using a method very similar to spell indexing, and grant gold accordingly. Also store the damage instance timer in a real array, setting it to 60 every time a hero deals damage and reducing it by 1 every second. If that timer gets to 0, de-index that damage instance or set it to zero, resetting it.
In my hero arena map ( work in progress ) i created a system where all nearby allied units ( and the killer, no matter the distance ) get gold for enemy kills, individual reward being divided by the amount of rewarded units.
I think i may actually do a test map today for this. I like the idea.
Sorry for necro, but i just manajed to make a K/D/A system that perfectly fits your needs:
When a unit is killed, it checks all damage dealt to it in the last 20 seconds. Max gold granted is calculated based on the unit's level, and if it is a hero ( heroes grant more gold ). That max gold value is then split to all attackers of that unit in those last 20 seconds, based on this formula:
(damage dealt by attacker/max damage on last 20 seconds)x Max gold awarded.
So, the bigger the damage percentage that attacker dealt, bigger the gold that attacker gets. The attacker with the biggest dmg percentage is granted the kill. All others get an assist.
It is quite simple:
It creates a hashtable for each unit damaged, using an Indexing system, and writes damage dealt/attacker name on that hash every time a unit is attacked.
I just need to get home (tomorrow) and I'll post it here, on hive for ya.