So heres what i wanted to happen -
I use the item ability(M202A2) then it creates a dummy unit at the position of the Caster then that dummy unit shoots at the Target point of ability being cast(it works) but the main problem is that it wont shoot randomly(like the farther u shoot it the worse the accuracy gets)Every 100 distance from where u shoot,then the region where the projectile will randomly land increases.
As for that ability in the condition of the If/Then/Else i also tried that without that condition but still the same happens
I use the item ability(M202A2) then it creates a dummy unit at the position of the Caster then that dummy unit shoots at the Target point of ability being cast(it works) but the main problem is that it wont shoot randomly(like the farther u shoot it the worse the accuracy gets)Every 100 distance from where u shoot,then the region where the projectile will randomly land increases.
-
M202A2
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Use M202A2
-
-
Actions
-
Set UnitLoc = (Position of (Casting unit))
-
Set PointOfShot = ((Integer((Distance between (Position of (Casting unit)) and (Target point of ability being cast)))) + 100)
-
Unit - Create 1 M202A2 for (Owner of (Casting unit)) at UnitLoc facing Default building facing degrees
-
Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
-
For each (Integer PointOfShot) from 1 to 10, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Level of Add Accuracy for (Triggering unit)) Equal to 0
-
-
Then - Actions
-
Unit - Order (Last created unit) to Attack Ground (Random point in (Region centered at (Target point of ability being cast) with size ((0.00 + 60.00), (0.00 + 60.00))))
-
-
Else - Actions
-
-
-
-
Custom script: call RemoveLocation(udg_UnitLoc)
-
-

Last edited: