• 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.

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