[ROC]Kill counter v1.0b (1.24 & vJASS required)

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
This system records for EVERY unit their kills and deaths, their dealt and taken damages.

The system is not hard, it just avoid lazy developers some coding

You can access to the recorded data whenever you want by calling one of those functions
JASS:
function GetUnitKillCount takes unit whichUnit returns integer
function GetUnitDieCount takes unit whichUnit returns integer
function GetUnitDamagesDealtCount takes unit whichUnit returns real
function GetUnitDamagesTakenCount takes unit whichUnit returns real

function GetUnitAlliedKillCount takes unit whichUnit returns integer
function GetUnitAlliedDieCount takes unit whichUnit returns integer
function GetUnitAlliedDamagesDealtCount takes unit whichUnit returns real
function GetUnitAlliedDamagesTakenCount takes unit whichUnit returns real

function GetUnitUnalliedKillCount takes unit whichUnit returns integer
function GetUnitUnalliedDieCount takes unit whichUnit returns integer
function GetUnitUnalliedDamagesDealtCount takes unit whichUnit returns real
function GetUnitUnalliedDamagesTakenCount takes unit whichUnit returns real

It also use my event system (1.0d included) to add the event AnyUnitDamaged, avoiding you registering the event EVENT_UNIT_DAMAGED for each unit (the system does it for you, so you need ONE line to register the event).

For the sample, when you select an unit, unit's stats pops up.
There is also a sample trigger using the event AnyUnitDamaged that display when a unit reaches a damage dealt cap (200, 400, 600... you can easily change this cap or turn off the trigger).


1.0b -> The system now records also allied and unallied damages/kills
1.0 -> first release


Keywords:
kill, counter, damage, event
Contents

Kill Counter v1.0b (Map)

Reviews
19:43, 26th Oct 2009 TriggerHappy187: Is this honestly needed...? You say it's a kill counter but it includes so much more, which defeats the point of calling it a kill counter (which could be created in 10 lines). And why are the majority...

Moderator

M

Moderator

19:43, 26th Oct 2009
TriggerHappy187:

Is this honestly needed...?

You say it's a kill counter but it includes so much more, which defeats the point of calling it a kill counter (which could be created in 10 lines).

And why are the majority of your globals public?

I'm going to reject this unless enough people disagrees with my decision.
 
did you know that you can UPDATE your system instead of uploading a new one???
(grey line over the sreenshot, on the right side: UPDATE button)
and if you do it like you did then plz delete your old version!

now your system:
it works quite good, even if i would have changed the test map triggers so they convert the values to integers for better readability^^
(its better to read "123 damage" instead of "123.345 damage")
your event system is full of documentation BUT i looked over it several times and couldn't understand until the fourth look-over how i have to use it

in addition it is possible to have the values displayed without your event system...
and so with much less code, but thats up to the user...

anyway good use of hashtables and very good (but sometimes too much) documentated so 4/5
add the librarys to the hive description here and try to explain the usage of your event system better for 5/5
 
Level 6
Joined
Jun 4, 2009
Messages
91
well, I know the update button. But for me they're different systems, so that's why I created a new one.

I know that it's possible to show caps without the event system, but showing those caps is just for demo.
The real utility of the event is to allow you to create your own trigger that fires when any unit takes damages with only one line of code.

I added the event because I thought counting only kills and deaths wouldn't be a real system.
 
Top