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

[Trigger] Mass Banishment

Status
Not open for further replies.
Level 9
Joined
Nov 27, 2014
Messages
1,966
Basically the spell i was going for was an AOE banish.
So how i did it was based it off the Silence Spell.
The Dummy Unit uses the Neutral Hostile Banish as base.
And did the following triggers.
  • Mass Banishment
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Mass Banishment Q
    • Actions
      • Set castingunit = (Casting unit)
      • Set point = (Target point of ability being cast)
      • Set aoe = (150 + (50 x (Level of Mass Banishment Q for castingunit)))
      • Set unitgroup = (Units within (Real(aoe)) of point matching ((((Matching unit) is Mechanical) Equal to False) and (((Owner of (Matching unit)) is an enemy of (Owner of castingunit)) Equal to True)))
      • Unit Group - Pick every unit in unitgroup and do (Actions)
        • Loop - Actions
          • Set point2 = (Position of (Picked unit))
          • Unit - Create 1 Dummy for (Owner of castingunit) at point2 facing Default building facing degrees
          • Unit - Add Banish Dummy to (Last created unit)
          • Unit - Set level of Banish Dummy for (Last created unit) to (Level of Mass Banishment Q for castingunit)
          • Unit - Order (Last created unit) to Human Blood Mage - Banish (Picked unit)
          • Unit - Add a 30.00 second Generic expiration timer to (Last created unit)
      • Custom script: call DestroyGroup(udg_unitgroup)
      • Custom script: call RemoveLocation(udg_point)
      • Custom script: call RemoveLocation(udg_point2)
But the spell does not trigger.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,537
Some other things.

1) You don't need to create the Dummy multiple times. A properly setup Dummy unit can handle all of the spell casting on it's own.
2) You can reference Triggering Player instead of owner of casting unit.
3) You can use "Custom script: set bj_wantDestroyGroup = true", saves you a line of code.
4) You can use an If Then Else to easily add more conditions to your target filter. This is just personal preference, I cannot stand using Matching + And.
5) Make sure your Dummy ability has 0 mana cost, 999999 cast range, 0 cast time, etc....

  • AoE Spell
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • Set VariableSet point = (Target point of ability being cast)
      • Set VariableSet aoe = (150.00 + (50.00 x (Real((Level of (Ability being cast) for (Triggering unit))))))
      • -------- --------
      • Unit - Create 1 Dummy for (Triggering player) at point facing Default building facing degrees
      • Unit - Add Banish to (Last created unit)
      • Unit - Set level of Banish for (Last created unit) to (Level of (Ability being cast) for (Triggering unit))
      • Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
      • -------- --------
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within aoe of point.) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is alive) Equal to True
              • ((Picked unit) belongs to an enemy of (Triggering player).) Equal to True
              • ((Picked unit) is A structure) Equal to False
              • ((Picked unit) is Mechanical) Equal to False
              • ((Picked unit) is hidden) Equal to False
              • ((Picked unit) is invulnerable) Equal to False
            • Then - Actions
              • Unit - Order (Last created unit) to Human Blood Mage - Banish (Picked unit)
            • Else - Actions
      • -------- --------
      • Custom script: call RemoveLocation (udg_point)
Dummy settings:
Movement Type: None
Speed Base: 0
Cast Point: 0.00
Cast Backswing: 0.00

The maps require the latest patch to open.
 

Attachments

  • Dummy Unit.w3m
    16.2 KB · Views: 23
  • Aoe Banish.w3m
    17 KB · Views: 27
Last edited:
Status
Not open for further replies.
Top