• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Charge Spell Movement

Status
Not open for further replies.
Level 8
Joined
Dec 16, 2007
Messages
252
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
 
Status
Not open for further replies.
Top