| 02-16-2004, 09:53 PM | #1 |
How do I detect units in a line. Say I wanted to find all the targets of a spell like shockwave, how would I go about doing this? |
| 02-16-2004, 10:02 PM | #2 |
I am sure there is a much better way but having a lot of units in range of a polar offset would work it would be pretty much check in circles on a line. I am having a hard time descirbing what i mean. |
| 02-16-2004, 10:20 PM | #3 |
Are we talking about a straight line here, or a cone-shaped one? |
| 02-17-2004, 12:56 AM | #4 |
I found a way to get the units in a straight line, but I have a problem now. I want to freeze these unit, but it just isn't working out well. I tried using invisible units with a freeze attack, that didn't work, now I am going to try a modfied frost nova to see if that will work. If anyone has an easy way to freeze units in a unit group i would very much appreciate it. Crap, so I though I was smart and got the unit group all figured out. But I didn't. Here is what I have, but it doesn't work for some reason. Code:
For each Interger A from 1 to 10 do
Add all units within 200 of MyPointVariable[integerA] to MyUnitGroupVariableOkay so I was just being stupid and that does work, but now my question still stands, How do I freeze these suckers? |
| 02-17-2004, 01:03 AM | #5 |
In the trigger and untility repository somebody made a sample map that solves this problem, it uses chainlighting that cripples all the targets. What he does is uses the unit takes damage event, and the same method should work for you. |
| 02-17-2004, 01:04 AM | #6 |
Thanks Titan, but I was able to get the effect I wanted with a modified version of frost nova and some dummy units. |
| 02-17-2004, 12:25 PM | #7 |
I can't help directly but i think it's named Integer and not Interger like in your code...:...: |
