• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Trigger] Spell immunity

Status
Not open for further replies.
Level 3
Joined
Apr 12, 2014
Messages
23
Hi!
I want to make spell immunity for my hero, but not all-spell-immunity, just one of them.

My first idea was that I could make a default active ability, and when an enemy use that spell, which one should have no-effect on my unit, I just check (with trigger) if my hero has the ability, but it seems I can not detect default active ability (at least I haven't found it).

How can I do it?
 
If the enemy spell is triggered, you can just filter if he has Spell Immunity ability so it can't be damaged by the spell , so the trigger of @Retarted_Hobo does the job to detect whether your unit has Spell Immunity or not, and then you can filter your units to damage
For example :
  • Set Enemies_AOE = (Units within 600 aoe matching condition ((Matching Unit) belongs to an enemy of Caster)
  • Unit Group - Pick Every unit in Enemies_AOE and do multiple actions :
    • Loop - Actions
      • If/Then/Else :
        • Conditions
          • (Level of Ability (Spell Immunity) of (Picked Unit)) Equal to 0
        • Then - Actions
          • Unit - Cause (Caster) to damage (Picked Unit) 300 damage of type Fire attack...
        • Else - Actions
          • === It can't be damaged ===
 
If the enemy spell is triggered, you can just filter if he has Spell Immunity ability so it can't be damaged by the spell , so the trigger of @Retarted_Hobo does the job to detect whether your unit has Spell Immunity or not, and then you can filter your units to damage
For example :
  • Set Enemies_AOE = (Units within 600 aoe matching condition ((Matching Unit) belongs to an enemy of Caster)
  • Unit Group - Pick Every unit in Enemies_AOE and do multiple actions :
    • Loop - Actions
      • If/Then/Else :
        • Conditions
          • (Level of Ability (Spell Immunity) of (Picked Unit)) Equal to 0
        • Then - Actions
          • Unit - Cause (Caster) to damage (Picked Unit) 300 damage of type Fire attack...
        • Else - Actions
          • === It can't be damaged ===
I did not see your comment when I write my last post, but I like it. It will be useful and has more possibilities. I was thnking about something like that with item (which fits more than a spell in my campaign), so you save me some time from thinking about how to do it exactly.
 
I did not see your comment when I write my last post, but I like it. It will be useful and has more possibilities. I was thnking about something like that with item (which fits more than a spell in my campaign), so you save me some time from thinking about how to do it exactly.

You can use it with items too, since it uses abilities too... :) Glad I did my job
 
Status
Not open for further replies.
Back
Top