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

[Trigger] Specific Simple Immunity

Status
Not open for further replies.
Level 22
Joined
Jul 25, 2009
Messages
3,091
How can I make units resistant to very specific things without making them resistant to others.

Ex. How can I make a squad immune to slow or poison, but not immune to magic in general.

This is an extremely broad question but I haven't been able to think of a way to do it yet. I have Bribe's DDS already installed in my map so this would be the best tool I'm assuming.
 
Level 6
Joined
Mar 17, 2012
Messages
105
I have ideas but they're probably far from efficient/pretty.

You could have a unit group for each type of immunity, add units that are immune to their respective unit groups.

Event - Unit starts the effect of an ability, if target of ability is in the immune Unit Group, heal the unit for any damage it takes and remove any negative debuff. That'd only work for an instantaneous spell though.

If the spell is a projectile, you could change the damage of each spell to a very specific but insignificant number (like 100.01, 100.02, 0.01, so on) and then use your DDS to detect if a unit takes that specific amount of damage. Check if the unit is in an immune Unit Group to that spell, then heal the unit for the damage it takes and remove the debuffs associated with it.
 
Status
Not open for further replies.
Top