• 🏆 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!

[Solved] Dispersion Spell

Status
Not open for further replies.
Level 9
Joined
Dec 16, 2017
Messages
343
Hello guys,i am trying to make a dispersion spell, where the caster get's spell immunity,damage reduction by 60% for 6 seconds, and heals for 2xSpell level% percent per second, i can't find the formula for number percent.. and disable attacks and spells casting for the caster, like basically doing a silence for attacks and spells on the caster

I use 1.28.5 patch WE

This is what i've done :

  • Dispersion
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Dispersion (Priest SHADOW)
    • Actions
      • Set DispersionCaster = (Triggering unit)
      • Set DispersionDuration = 6
      • Unit - Add DispersionDMGReduction to DispersionCaster
      • Player - Disable DispersionDMGReduction for (Owner of DispersionCaster)
      • Special Effect - Create a special effect attached to the origin of DispersionCaster using Dispersion.mdx
      • Set DispersionSFX = (Last created special effect)
      • Trigger - Turn on DispersionLoop <gen>
  • DispersionLoop
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set DispersionCasterPosition = (Position of DispersionCaster)
      • Set DispersionGroup = (Units within 30.00 of DispersionCasterPosition)
      • Unit Group - Pick every unit in DispersionGroup and do (Actions)
        • Loop - Actions
          • Unit - Set life of DispersionCaster to ((Life of DispersionCaster) + (((1.00 + (Real((Level of Dispersion (Priest SHADOW) for DispersionCaster)))) + (Percentage life of DispersionCaster)) + 0.00))
          • Set DispersionDuration = (DispersionDuration - 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DispersionDuration Equal to 0
        • Then - Actions
          • Special Effect - Destroy DispersionSFX
          • Player - Enable DispersionDMGReduction for (Owner of DispersionCaster)
          • Unit - Remove DispersionDMGReduction from DispersionCaster
          • Trigger - Turn off (This trigger)
        • Else - Actions
      • Custom script: call DestroyGroup(udg_DispersionGroup)
      • Custom script: call RemoveLocation(udg_DispersionCasterPosition)
 
Level 9
Joined
Dec 16, 2017
Messages
343
  • Unit - Set life of DispersionCaster to ((Life of DispersionCaster) + ((Life of DispersionCaater) x 0.01 x 2 x (Real((Level of Dispersion (Priest SHADOW) for DispersionCaster))))
Thanks a lot mate!

Later edit:
-is there any spell or function that can prevent the caster from using spells? like a type of silence?
-for attack disable i am using cargo hold from the orcs <Abun>
 
Last edited:
Level 12
Joined
Nov 3, 2013
Messages
989
I think there was some new native or whatever to disable attacks, not sure if it was actually implemented and if it's in 1.28 or only later versions.

But in the past the way to disable auto attacking has been to give units the Cargo Hold (orc burrow) ability, so if you can't find any trigger for disabling auto attacks use that. Though you need to remember to remove it when you want the unit to be able to attack again.


As for silencing the unit, not sure if you can silence a spell immune unit or not. Maybe if you make the silence ability's level requirement level 6 to turn it into an ultimate ability or something?


If you were using a later version of warcraft 3, 1.31.1 or maybe some of the 1.30 versions then you can disable a unit's abilities with triggers.
 
Level 9
Joined
Dec 16, 2017
Messages
343
I think there was some new native or whatever to disable attacks, not sure if it was actually implemented and if it's in 1.28 or only later versions.

But in the past the way to disable auto attacking has been to give units the Cargo Hold (orc burrow) ability, so if you can't find any trigger for disabling auto attacks use that. Though you need to remember to remove it when you want the unit to be able to attack again.


As for silencing the unit, not sure if you can silence a spell immune unit or not. Maybe if you make the silence ability's level requirement level 6 to turn it into an ultimate ability or something?


If you were using a later version of warcraft 3, 1.31.1 or maybe some of the 1.30 versions then you can disable a unit's abilities with triggers.
I found this Cargo Hold few moments ago when searching through the spells that "transport the units" like meat wagons have with corpse, or burrows of orcs have with units and it really works xD, i didn't expected, thanks aswell !
About silence,hmm yeah that is still a strange line..What do you mean by making the silence level requirement to 6?
On the character i am making this dispersion for, i have mind flay,shadow word: Pain and vampiric touch, and this dispersion would be the ultimate
 
Level 12
Joined
Nov 3, 2013
Messages
989
About silence,hmm yeah that is still a strange line..What do you mean by making the silence level requirement to 6?
Is there a way to make magic immunity ignore friendly spells?

I haven't actually tried it myself tbh, but I've seen a few mentions of this trick over the years


Hello guys,i am trying to make a dispersion spell, where the caster get's spell immunity,damage reduction by 60% for 6 seconds, and heals for 2xSpell level% percent per second, i can't find the formula for number percent.. and disable attacks and spells casting for the caster, like basically doing a silence for attacks and spells on the caster
Anyway, so if you want your unit to be silenced, but it's magic immune, and magic immunity presumably prevents the silence, then just do this trick to make the silence ability count as an "ultimate" ability and thus ignore magic/spell immunity.


And ofc you'll be spawning a dummy unit that's casting this silence ability
 
Level 9
Joined
Dec 16, 2017
Messages
343
Is there a way to make magic immunity ignore friendly spells?

I haven't actually tried it myself tbh, but I've seen a few mentions of this trick over the years



Anyway, so if you want your unit to be silenced, but it's magic immune, and magic immunity presumably prevents the silence, then just do this trick to make the silence ability count as an "ultimate" ability and thus ignore magic/spell immunity.


And ofc you'll be spawning a dummy unit that's casting this silence ability
Thanks a lot !
 
Status
Not open for further replies.
Top