Killing units

Status
Not open for further replies.
Another small thing which may or may not have an effect is that if you kill the units, yes the animations and etc will go off which means the corpses remain meaning that players who own units that interact with corpses (necromancers, death knights, ghouls etc) will gain an advantage. Might not be that big of a deal but it all depends on what kind of map and units you have and are making.
 
Not sure but wont killing a unit give exp ? So... yea use Remove.

Another thing:

If you are upgrading into another race shouldn't something like "replace" be used ?

If every unit of the first race (the one which goes away) has a counterpart of the second race.
so you create a list of units and check if the unit is equal to... Something like:

Pick all units for player
== For loop IndexVar(0 to NumberOfDifferentUnits)
==== if (picked unit) = RaceONEUnit[IndexVar]
====== Replace (picked unit) with RaceTWOUnit[IndexVar]
====== Break
==== else
====|empty|
 
> Not sure but wont killing a unit give exp ? So... yea use Remove.

Killed units via triggers don't give exp, so it's perfectly safe to use kill function. Though, remove would be better in this case.
 
Status
Not open for further replies.
Back
Top