- Joined
- Dec 4, 2007
- Messages
- 76
I need to figure out how to make a unit attack really fast in a circle around itself at a given distance...
Right now i've got a tower and a TempPoint and FacingDegrees variable, I set FacingDegrees to 1 (which is just 1 degree, not the facing of the tower) and TempPoint to position of the tower offset by 350 towards FacingDegrees and then order it to attack to temppoint.
So in essence, the tower should attack 350 units away from itself facing 1 degrees. However, I need to loop this to do it in a full circle. I tried using the "For every integer A from 1 to 360" loop, I ordered the tower to attack to temppoint in the loop, then set FacingDegrees to FacingDegrees+1, then reset temppoint to include the new value of facingdegrees. But my problem with this is that the tower wont attack due to the fact that it cant attack in 0.01 seconds and then reset and attack again (Damned Cooldown...)
I set the attack cooldown of the tower and all the animations and backswing times to 0, but it still doesnt work.
So is there any way to modify this or make a different trigger to make the unit attack in a circle around itself really quick? I Need to know... +Rep to anyone who can help.
Right now i've got a tower and a TempPoint and FacingDegrees variable, I set FacingDegrees to 1 (which is just 1 degree, not the facing of the tower) and TempPoint to position of the tower offset by 350 towards FacingDegrees and then order it to attack to temppoint.
So in essence, the tower should attack 350 units away from itself facing 1 degrees. However, I need to loop this to do it in a full circle. I tried using the "For every integer A from 1 to 360" loop, I ordered the tower to attack to temppoint in the loop, then set FacingDegrees to FacingDegrees+1, then reset temppoint to include the new value of facingdegrees. But my problem with this is that the tower wont attack due to the fact that it cant attack in 0.01 seconds and then reset and attack again (Damned Cooldown...)
I set the attack cooldown of the tower and all the animations and backswing times to 0, but it still doesnt work.
-
Tower1
- Events
- Conditions
-
Actions
- Set FacingDegree = 1.00
- Set TempPoint = ((Position of Cannon Tower 0082 <gen>) offset by 250.00 towards FacingDegree degrees)
-
For each (Integer A) from 1 to 360, do (Actions)
-
Loop - Actions
- Unit - Order Cannon Tower 0082 <gen> to Attack Ground TempPoint
- Wait 0.01 seconds
- Set FacingDegree = (FacingDegree + 1.00)
- Set TempPoint = ((Position of Cannon Tower 0082 <gen>) offset by 250.00 towards FacingDegree degrees)
-
Loop - Actions
So is there any way to modify this or make a different trigger to make the unit attack in a circle around itself really quick? I Need to know... +Rep to anyone who can help.