• 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.

How to exclude Dummy units from Unit Groups

Status
Not open for further replies.
Level 11
Joined
Sep 14, 2009
Messages
284
Hi. Im making a spell that deals AoE damage, and then creates a shield on the casting unit that will absorb damage equal to the damage done by the AoE.

Everything is working, except that Im worried that when the Unit group for the units that will take damage will include dummy units (which will cuase the shield to absorb more damage than it should, since dummy units should act as they dont exist).

I have alot of different dummy unit types in the map so checking unit type for matching unit etc won't work. And other dummy units have long timers for other triggered spells, so the chance they are picked during this AoE spell is quite big.
 
Dummies have Locust, don't they? Unit Group enumerations do not count them at all. However, for future reference, if you want to exclude certain targets, add to each unit type (through the Object Editor) a passive ability and check in your enumeration if Level of DummyAbility for (Picked unit) is Equal to 0. You may also want to add the ability to a spell book, which is disabled for every player at the Map's Initialization.
 
Status
Not open for further replies.
Top