• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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