HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Unit Arrays on LBs

02-15-2003, 02:38 AM#1
Tearsong
Someone help me! What would be the most efficient way of storing a Player's Kills without setting each monster to its own Variable?

Arrays, Variables, Mass Amounts of Triggers?

Any help is MUCH appreciated.
02-15-2003, 07:01 AM#2
DemonicSoul
integer variable, when the player kills a unit, it sets it to 1 more than what it is

like: set kills[1] = kills[1+1] (or kills[1]+1? ... doesnt really matter)

anyways... ill check back if i remember hope this helps


cripes im tired
02-15-2003, 07:06 AM#3
Guest
I think you would want to set the variable like so...

set kills[x] = kills[x]+1
where x = player number of killing unit

Run that everytime a unit is killed and then just call kills[x] to get the # of kills for that player.

If you want to do this for units, rather than players, you would need to do it in custom text and use my GetUnitInteger function (see signature). Then just set x = GetUnitInteger(killing unit).