TPOX
New Member
- Reaction score
- 10
Hi, here is my trigger.... everything works cept the dummy part, it spawns and dies but just wont cast the spell. I tried using several stun spells but nothing would work.
Code:
Battle Charge
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Battle Charge
Actions
Set TempReal = 0.00
Set TargetUnitOfAbilityBeingCast = (Target unit of ability being cast)
Set Distance = (Integer((Distance between (Position of (Casting unit)) and (Position of TargetUnitOfAbilityBeingCast))))
Unit - Set (Casting unit) movement speed to 800.00
Unit - Order (Casting unit) to Attack TargetUnitOfAbilityBeingCast
Set Wait = (Create a periodic One-shot timer lasting 7.00)
Wait until (((Integer((Distance between (Position of (Casting unit)) and (Position of TargetUnitOfAbilityBeingCast)))) Less than or equal to 200) or (((Current order of (Casting unit)) Equal to (Order(smart))) or ((Integer((Remaining time for Wait))) Equal to 0))), checking every 1.00 seconds
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Integer((Distance between (Position of (Casting unit)) and (Position of TargetUnitOfAbilityBeingCast)))) Less than or equal to 200
Then - Actions
Unit - Set mana of (Casting unit) to ((Mana of (Casting unit)) + (10.00 x (Real((Level of Battle Charge for (Casting unit))))))
Unit - Set (Casting unit) movement speed to (Default movement speed of (Casting unit))
Unit - Order (Casting unit) to damage TargetUnitOfAbilityBeingCast for (1.00 x (Real(Distance))) using attack type Normal and damage type Universal.
Unit - Create 1 Peasant for (Owner of (Casting unit)) at (Position of TargetUnitOfAbilityBeingCast) facing (Position of TargetUnitOfAbilityBeingCast)
Unit - Set Level of Charge Stun (Dummy Spell) for (Last created unit) to (1 x (Level of Battle Charge for (Casting unit)))
Unit - Add a 0.01 second Generic expiration timer to (Last created unit)
Unit - Order (Last created unit) to Neutral - Firebolt TargetUnitOfAbilityBeingCast
Set TempReal = (Real((1 x Distance)))
Floating Text - Create floating text that reads ((|cffFFFF00 + (String((Integer(TempReal))))) + ( Damage + <Empty String>)) at (Position of (Casting unit)) with Z offset 0.00, using font size 12.00, color (100.00%, 100.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Set TempFloatText = (Last created floating text)
Wait 3.00 seconds
Floating Text - Destroy (Last created floating text)
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current order of (Casting unit)) Equal to (Order(smart))
Then - Actions
Unit - Set (Casting unit) movement speed to (Default movement speed of (Casting unit))
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Integer((Remaining time for Wait))) Equal to 0
Then - Actions
Unit - Set (Casting unit) movement speed to (Default movement speed of (Casting unit))
Else - Actions
Do nothing


