• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

War Stomp Move Unit Instantly (Ability)

Status
Not open for further replies.
Level 10
Joined
Jun 13, 2010
Messages
398
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
 
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.
 
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)
 
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.
Back
Top