Ive done spells like this before. The basic idea behind mine was 4 arrays-
1 unit array for the rotating units
1 real array for the distance (in this case it stays the same, so you dont need this)
1 real array for the angle
1 point array for unleaking.
Basically, from each integer 1 thtough however many objects you have, you will (on your trigger #1, initilization) give it a preset angle. Lets say your using 2 projectiles. 1 has a preset angle real of 180 and another of 0.
In the second trigger, the main one, every .04 seconds it does this:
Sets a variable to the axis
Uses a loop to set each angle real to the angle real + 2 or so. (so they can rotate)
Uses a loop to set each point in your array to (Axis Center) offset by (Distance from axis) with angle (angle array[Integer A])
For the damage, you will just set a unit group variable to units in range, and if a random unit in that group is a unit, damage and destroy the projectile. Or else, do nothing so the projectile continues.
If you need anything explained in more detail, just ask. I can post the triggers I used if you need that, also.
Edit: Heres the triggers:
Heres the triggers, by Zoraykos's request.
Note - I deleted the parts of these triggers which cause the projectiles to face the correct way and damage things, because they are confusing as hell (even to me and I wrote this)
The first trigger basically sets all of your variables and creates your dummy units.
-
ActivatePwnage Copy
-
Events
-
Unit - A unit Starts the effect of an ability
-
Conditions
-
(Ability being cast) Equal to Pwnage
-
Actions
-
Set PwnagePoint[0] = (Position of (Triggering unit))
-
Set PwnageUnit[0] = (Triggering unit)
-
For each (Integer A) from 1 to 10, do (Actions)
-
Loop - Actions
-
Set PwnageReal[(Integer A)] = (36.00 x (Real((Integer A))))
-
For each (Integer A) from 1 to 10, do (Actions)
-
Loop - Actions
-
Set PwnagePoint[(Integer A)] = (PwnagePoint[0] offset by 200.00 towards PwnageReal[(Integer A)] degrees)
-
Unit - Create 1 BlueBallDummy for (Owner of PwnageUnit[0]) at PwnagePoint[(Integer A)] facing Default building facing degrees
-
Set PwnageUnit[(Integer A)] = (Last created unit)
-
For each (Integer A) from 0 to 10, do (Actions)
-
Loop - Actions
-
Custom script: call RemoveLocation(udg_PwnagePoint[GetForLoopIndexA()])
-
Trigger - Turn on Main Pwnage Copy <gen>
The second trigger is the bulk of it. Basically, this moves the units to a point will polar offset with the angle of your corresponding real array. Once it does that, it increases each variable in the array by a small amount so they rotate. Finally, it cleans up the variables and prepares to occur all over again.
-
Main Pwnage Copy
-
Events
-
Time - Every 0.04 seconds of game time
-
Conditions
-
Actions
-
Set PwnagePoint[0] = (Position of PwnageUnit[0])
-
For each (Integer A) from 1 to 10, do (Actions)
-
Loop - Actions
-
Set PwnagePoint[(Integer A)] = (PwnagePoint[0] offset by 200.00 towards PwnageReal[(Integer A)] degrees)
-
For each (Integer A) from 1 to 10, do (Actions)
-
Loop - Actions
-
Set PwnageReal[(Integer A)] = (PwnageReal[(Integer A)] + 8.00)
-
For each (Integer A) from 1 to 10, do (Actions)
-
Loop - Actions
-
Set PwnagePoint[(Integer A)] = (PwnagePoint[0] offset by (PwnageReal[((Integer A) + 10)] + 0.00) towards PwnageReal[(Integer A)] degrees)
-
Unit - Move PwnageUnit[(Integer A)] instantly to PwnagePoint[(Integer A)], facing (0.00 + (Angle from PwnagePoint[((Integer A) + 10)] to PwnagePoint[(Integer A)])) degrees
-
For each (Integer A) from 0 to 10, do (Actions)
-
Loop - Actions
-
Custom script: call RemoveLocation(udg_PwnagePoint[GetForLoopIndexA()])
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
PwnageReal[1] Greater than or equal to 600.00
-
Then - Actions
-
For each (Integer A) from 1 to 10, do (Actions)
-
Loop - Actions
-
Unit - Kill PwnageUnit[(Integer A)]
-
For each (Integer A) from 0 to 20, do (Actions)
-
Loop - Actions
-
Set PwnageReal[(Integer A)] = 0.00
-
Trigger - Turn off (This trigger)
-
Else - Actions