LordSaddler1
New Member
- Reaction score
- 4
This ability is supposed to be a bounce ability. If there is a simpler way to do this then please tell me. Anyone know why this ability doesnt flow smoothly? Sometimes it barely works, only shooting the original spear, sometimes it shoots all 10-20 at 1 target from the same location. Its just all messed up.
Code:
Bounding Spear
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Bounding Spear
Actions
Set Bounding_Caster = (Triggering unit)
Set Bounding_Integer = Bounding_Integer
Set Bounding_Target = (Target unit of ability being cast)
Set Bounding_Region = (Region centered at (Position of Bounding_Target) with size (500.00, 500.00))
Wait until ((Bounding_Target has buff Bounding Spear Target ) Equal to True), checking every 0.20 seconds
For each (Integer A) from 1 to (5 + (5 x (Level of Bounding Spear for Bounding_Caster))), do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Bounding_Integer Less than (5 + (5 x (Level of Bounding Spear for Bounding_Caster)))
Then - Actions
Unit Group - Pick every unit in (Random 1 units from (Units in Bounding_Region)) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Bounding_Target Equal to (Picked unit)
Then - Actions
Do nothing
Else - Actions
Unit - Create 1 Casting Dummy for (Owner of Bounding_Caster) at (Position of Bounding_Target) facing Default building facing degrees
Set Bounding_Dummy = (Last created unit)
Set Bounding_Target = (Picked unit)
Set Bounding_Region = (Region centered at (Position of Bounding_Target) with size (500.00, 500.00))
Unit - Add Bounding Spear (Dummy) to Bounding_Dummy
Unit - Set level of Bounding Spear (Dummy) for Bounding_Dummy to (Level of Bounding Spear for Bounding_Caster)
Unit - Order Bounding_Dummy to Human Mountain King - Storm Bolt Bounding_Target
Wait until ((Bounding_Target has buff Bounding Spear Target ) Equal to True), checking every 0.30 seconds
Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
Unit - Set mana of Bounding_Caster to ((Mana of Bounding_Caster) - (20.00 + (10.00 x (Real((Level of Bounding Spear for Bounding_Caster))))))
Set Bounding_Integer = (Bounding_Integer + 1)
Else - Actions
Set Bounding_Integer = 0