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

[General] Is there anti-polymorph passive spell?

Status
Not open for further replies.
Level 21
Joined
May 29, 2013
Messages
1,566
The short answer is no. By using standard Warcraft 3 abilities with no triggering a unit will either be immune to all effects or none.
Yes, there is no way without triggering, but maybe you could do it if you edit Data - Maximum Creep Level field (5 by default), and make the level of a unit to something higher. However, by increasing the level, unit also gains immunity to some other abilities (Charm, Transmute, Possession...).
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,219
just unit begins casting an ability then? or that doesn't work either? In worst case scenario add 0.00 wait.

edit:
  • Untitled Trigger 001
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • Wait 0.00 seconds
      • Unit - Remove Polymorph buff from (Target unit of ability being cast)
works, confirmed.

edit2: use this to make it MUI.
  • Untitled Trigger 001 Copy
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • Custom script: local unit u = GetSpellTargetUnit()
      • Custom script: set udg_unit = u
      • Wait 0.00 seconds
      • Unit - Remove Polymorph buff from unit
      • Custom script: set u = null
 

hdm

hdm

Level 9
Joined
Nov 19, 2011
Messages
384
And if you use any spell that dispells buffs ? Like abolish magic, or dispell magic. Via trigger, I mean.
 
Level 13
Joined
Jul 16, 2012
Messages
679
Or just use MUI instead using wait action

idk if this is work or not
Triggers

  • Untitled Trigger 003
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Polymorph
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Y Equal to 0
        • Then - Actions
          • Trigger - Turn on Untitled Trigger 004 <gen>
        • Else - Actions
      • Set Y = (Y + 1)
      • Set TargetUnit[Y] = (Target unit of ability being cast)
      • Set Buff[Y] = True
  • Untitled Trigger 004
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer X) from 1 to Y, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Buff[X] Equal to True
            • Then - Actions
              • Set Buff[X] = False
              • Unit - Remove Polymorph buff from TargetUnit[X]
              • Set X = (X - 1)
              • Set Y = (Y - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Y Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions
 
Level 12
Joined
Feb 22, 2010
Messages
1,115
This will make target unit stop if he using a channeling spell or such things.

Instead you should stop casting unit when it is casting polymorph.
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
just unit begins casting an ability then? or that doesn't work either? In worst case scenario add 0.00 wait.

edit:
  • Untitled Trigger 001
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • Wait 0.00 seconds
      • Unit - Remove Polymorph buff from (Target unit of ability being cast)
works, confirmed.

edit2: use this to make it MUI.
  • Untitled Trigger 001 Copy
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • Custom script: local unit u = GetSpellTargetUnit()
      • Custom script: set udg_unit = u
      • Wait 0.00 seconds
      • Unit - Remove Polymorph buff from unit
      • Custom script: set u = null

this is still not MUI, if you name the local variable udg_unit and remove the second custom script(set udg_unit = u) it will actually work and be MUI
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
no, you dont need to assign it at all

this method is called variable shadowing, where you still reference it by the udg_unit, but because you have 2 udg_unit variables, you will use the one that is closer to the scope, which is the local variable, not the global one, so even when you reference it through the global variable, you still use the local variable.

The other way is yes, move it past the wait :D
 
Status
Not open for further replies.
Top