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

howl of terror with polymorf

Status
Not open for further replies.
Level 17
Joined
Dec 24, 2018
Messages
578
Hello, i work on altered melee map with custom race and i looking for trigger like this: units cast howl of terror or silence and enemies afected with this spells will by slowed or polymorfed, cursed or
crippling, or just sleeped. so can please somebody created this trigger ?
 
Level 6
Joined
Mar 7, 2011
Messages
124
would this work? im wondering if ability-being-cast will still be Howl of Terror when the event is ability-finished-cast. i think you need ability-finished-cast because you want the Howl of Terror buff to have already been applied by the time you add your custom logic

i picked 2000 for the max distance from the caster because it just needs to be a number greater than or equal to the AoE of Howl of Terror

  • Wave of Terror Custom
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Howl of Terror
    • Actions
      • Unit Group - Pick every unit in (Units within 2000.00 of (Position of (Triggering unit)).) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Howl of Terror) Equal to True
            • Then - Actions
            • Else - Actions
 
Level 6
Joined
Mar 7, 2011
Messages
124
ah sorry, i always forget how hard it is to apply a buff. i see now that's what you were asking about

i think your only current option is to use a dummy caster to cast custom spells which result in the buffs you want. it seemed like Bliz was going to make it so you could fully script custom spells, they added new natives for scripting VFX and SFX, but then scripted buffs never came
 
Level 6
Joined
Mar 7, 2011
Messages
124
yeah exactly. and you'd just rinse and repeat with your other buffs however you want. it might be cool to hit most of the units with slow, and then a very few with polymorph, or something like that. you could do that using random numbers
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,515
Here's how you can do it with a Dummy unit casting Polymorph.

All units within 500 AoE of the caster will be Polymorphed.

I used the IsUnitInRange() function as it's more precise than just picking nearby units.

If you don't use this function then there can be cases where units near the edge of the AoE will get hit by Howl but not become Polymorphed.
  • Cast Howl of Terror
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Howl of Terror
    • Actions
      • Set VariableSet Point = (Position of (Triggering unit))
      • -------- --------
      • -------- Set this to the Area of Effect of Howl of Terror --------
      • Set VariableSet AoE = 500.00
      • -------- --------
      • Unit - Create 1 Dummy (Uncle) for (Triggering player) at Point facing Default building facing degrees
      • Unit - Add Polymorph (Dummy) to (Last created unit)
      • Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
      • -------- --------
      • Set VariableSet AoE_Extra = (AoE + 300.00)
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within AoE_Extra of Point.) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) belongs to an enemy of (Triggering player).) Equal to True
              • ((Picked unit) is alive) Equal to True
              • ((Picked unit) is A structure) Equal to False
              • ((Picked unit) is hidden) Equal to False
              • ((Picked unit) is invulnerable) Equal to False
              • ((Picked unit) is Magic Immune) Equal to False
            • Then - Actions
              • Custom script: if IsUnitInRange(GetEnumUnit(), GetTriggerUnit(), udg_AoE) then
              • Unit - Order (Last created unit) to Human Sorceress - Polymorph (Picked unit)
              • Custom script: endif
            • Else - Actions
      • Custom script: call RemoveLocation (udg_Point)
 

Attachments

  • Howl Of Terror Polymorph.w3m
    18.1 KB · Views: 22
Status
Not open for further replies.
Top