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

War Stomp Move Unit Instantly (Ability)

Status
Not open for further replies.
Level 8
Joined
Jun 13, 2010
Messages
344
Hi,
I wanna make a War Stomp ability which stuns enemy units in the area.
Additionally, the ability is ment to move enemy units hit to the casting location. How do I do that?

Thank you
 
Level 21
Joined
Nov 4, 2013
Messages
2,017
Create an unit group e.g StunnedUnits

  • Events
    • Unit - A unit Start the effect of an ability
  • Conditions
    • (Ability being cast) Equal to (Your skill)
  • Actions
    • Set StunnedUnits = (Units within (AoE of skill) range of (Casting Unit)) matching (((Matching Unit) has buff Stunned) Equal to True))
    • Unit Group - Pick every unit in StunnedUnits and do (Unit - Move (Picked unit) instantly to (Position of (Casting Unit)))
    • Custom script: call DestroyGroup(udg_StunnedUnits)
You can always use variables for the position of casting unit and the casting unit itself.
 
Level 18
Joined
May 11, 2012
Messages
2,103
You want to do the DotA's Magnus ability, which is Reverse Polarity.
Here you go:
  • Reverse Polarity
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Your Skill
    • Actions
      • Set TempTrigUnit = (Triggering unit)
      • Set TempPoint = (Position of TempTrigUnit)
      • Set TempUnitGroup = (Units within (War Stomp's Area of Effect) of TempPoint)
      • Unit Group - Pick every unit in TempUnitGroup and do (Actions)
        • Loop - Actions
          • Set TempUnit = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (TempUnit is A structure) Not equal to True
              • (TempUnit is Magic Immune) Not equal to True
              • (TempUnit is dead) Not equal to True
              • (TempUnit belongs to an enemy of (Triggering player)) Not equal to True
            • Then - Actions
              • Unit - Move TempUnit instantly to TempPoint
            • Else - Actions
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: call DestroyGroup(udg_TempUnitGroup)
 
Level 8
Joined
Jun 13, 2010
Messages
344
You want to do the DotA's Magnus ability, which is Reverse Polarity.
Here you go:
  • Reverse Polarity
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Your Skill
    • Actions
      • Set TempTrigUnit = (Triggering unit)
      • Set TempPoint = (Position of TempTrigUnit)
      • Set TempUnitGroup = (Units within (War Stomp's Area of Effect) of TempPoint)
      • Unit Group - Pick every unit in TempUnitGroup and do (Actions)
        • Loop - Actions
          • Set TempUnit = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (TempUnit is A structure) Not equal to True
              • (TempUnit is Magic Immune) Not equal to True
              • (TempUnit is dead) Not equal to True
              • (TempUnit belongs to an enemy of (Triggering player)) Not equal to True
            • Then - Actions
              • Unit - Move TempUnit instantly to TempPoint
            • Else - Actions
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: call DestroyGroup(udg_TempUnitGroup)

Don't you mean
  • (TempUnit belongs to an enemy of (Triggering player)) Not equal to True
should be equel to true?
I mean, TempUnit is the affected unit of War Stomp. TempUnit is therefor an enemy of the triggering unit. So the affected unit belongs to an enemy of triggering unit is true.. Right?
Also the last part with the scripting. I do not know how to script. :/
But it seems like I don't need it. They just keep spawning at my casting point. No leaks so far.
Also made:
  • WarStompTempUnit Not equal to WarStompTrigUnit
Since he kept moving himself, disrupting the ability but spending mana.. ^^

Thank you very much! Seems to work! Grateful!
 
Last edited:
Status
Not open for further replies.
Top