• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

HERO KILL Assist System

Status
Not open for further replies.
Level 8
Joined
Oct 19, 2008
Messages
168
What is the best way to set up a hero kill assist system for hero arena type games?

Like the ones used in human vs orcs or dota

Because killstealing is getting very annoying

And in GUI preferably

Thanks!!
 
Level 8
Joined
Oct 19, 2008
Messages
168
The one who dealt the most damage but did not kill the unit. But also if 2 player's do almost the same damage to a 3rd hero, they should both get a reward. So like an assist with a minimum requirement, sorry I wasn't specific before
 
Level 5
Joined
Oct 2, 2013
Messages
95
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.
 
Level 8
Joined
Oct 19, 2008
Messages
168

I posted this before the other person did and I wouldn't post threads if I could find the answer somewhere else

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.

That's a good idea though, but can the damage detection detect spell damage as well? I can't remember if there's even a trigger for finding out dmg done so how would you go about that then
 
Level 5
Joined
Oct 2, 2013
Messages
95
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.
 
Level 8
Joined
Oct 19, 2008
Messages
168
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.

awesome thanks
 
Status
Not open for further replies.
Top