• 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.
  • It's time for the first HD Modeling Contest of 2025. Join the theme discussion for Hive's HD Modeling Contest #7! Click here to post your idea!

Killing units

Status
Not open for further replies.
Level 2
Joined
Jan 22, 2013
Messages
11
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.
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
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|
 
Level 6
Joined
May 20, 2014
Messages
228
> 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.
Top