• 💀 Happy Halloween! 💀 It's time to vote for the best terrain! Check out the entries to Hive's HD Terrain Contest #2 - Vampire Folklore.❗️Poll closes on November 14, 2023. 🔗Click here to cast your vote!
  • 🏆 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!
  • 🏆 HD Level Design Contest #1 is OPEN! Contestants must create a maze with at least one entry point, and at least one exit point. The map should be made in HD mode, and should not be openable in SD. Only custom models from Hive's HD model and texture sections are allowed. The only exceptions are DNC models and omnilights. This is mainly a visual and design oriented contest, not technical. The UI and video walkthrough rules are there to give everyone an equal shot at victory by standardizing how viewers see the terrain. 🔗Click here to enter!

Charge Spell Movement

Not open for further replies.
Level 8
Dec 16, 2007
I made a charge spell and I got problem with the periodic movement trigger which I used. When the caster targets a unit who is behind a doodad or a wall, the caster gets stuck on the wall. I know why this happens but not how to solve it. What I want is that the caster will acts like he got an attack orde so he'll turn around the doodad instead of keep walking into the doodad, but at the same time I want to use the periodic thing so he'll walk faster.
Could u guys find a solution?
(I don't want to use the collision thing)

Well here's the trigger Periodic Movement trigger.
Don't think u need the casting trigger, but if u need it I'll post it too.
Thanks in advance

  • Charge Movement
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • Set Charge_Angle[Charge_CustomValue] = (Angle from Charge_CasterPoint[Charge_CustomValue] to Charge_TargetPoint[Charge_CustomValue])
      • Set Charge_CasterPoint[Charge_CustomValue] = (Position of Charge_Caster[Charge_CustomValue])
      • Set Charge_TargetPoint[Charge_CustomValue] = (Position of Charge_Target[Charge_CustomValue])
      • Set Charge_Point[Charge_CustomValue] = (Charge_CasterPoint[Charge_CustomValue] offset by 10.00 towards Charge_Angle[Charge_CustomValue] degrees)
      • Unit - Move Charge_Caster[Charge_CustomValue] instantly to Charge_Point[Charge_CustomValue]
      • Special Effect - Create a special effect attached to the foot of Charge_Caster[Charge_CustomValue] using Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
      • Special Effect - Destroy (Last created special effect)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Distance between Charge_CasterPoint[Charge_CustomValue] and Charge_TargetPoint[Charge_CustomValue]) Less than or equal to 150.00
        • Then - Actions
          • Unit - Create 1 Dummy Unit for (Owner of Charge_Caster[Charge_CustomValue]) at Charge_TargetPoint[Charge_CustomValue] facing Default building facing degrees
          • Unit - Set the custom value of (Last created unit) to Charge_CustomValue
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
          • Unit - Add Charge Stun (Dummy) to (Last created unit)
          • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt Charge_Target[Charge_CustomValue]
          • Trigger - Turn off (This trigger)
          • Custom script: call RemoveLocation(udg_Charge_Point[udg_Charge_CustomValue])
          • Custom script: call RemoveLocation(udg_Charge_TargetPoint[udg_Charge_CustomValue])
          • Custom script: call RemoveLocation(udg_Charge_CasterPoint[udg_Charge_CustomValue])
        • Else - Actions
          • Do nothing
Not open for further replies.