| 01-22-2006, 09:05 AM | #1 |
Hi! I'm trying to make a custom arrow-shoot ability like the one in archery tactics, but subtly different. Here's what i want it to do: It must be manually-targeted via an ability. It must be able to be targeted both on a unit and on ground. It must travel in a straight line (or slightly curved path - like real projectiles) It must stop when it hits a target, so that it can only damage one unit. This seems very difficult to accomplish without triggers, which i subsequently tried! I made a custom unit called "arrow" and gave it the locust ability so it was unselectable. But here's the big problem - unit speeds are limited to around 522 (i think - couldn't find a way to modify this in the custom gameply constants of the world editor) so when i move the arrow via unit- issue order targeting point, it's incredibly sluggish. Does anyone have any ideas how to overcome the above problem, or a better way of achieving what i outlined at the top? Thanks a lot in advance to anyone who replies. |
| 01-22-2006, 09:14 AM | #2 |
Your right, the maximum unit speed limit in Warcraft is 522. You can work around this by starting a repeating timer that moves your unit. Units cast ability ability is arrow if target unit of ability being cast = null then set target = target point of ability being cast else set target = position of target unit of ability being cast create 1 arrow for casting unit set arrow = last created unit make arrow face angle between position of casting unit and position of target unit of ability being cast start timertrigger Every 0.01 Move arrow to position of arrow offset by 10 towards facing of arrow detect unit thing |
| 01-22-2006, 10:24 AM | #3 |
That helps loads! I tried doing the timer thing before, but i didn't know how to tell the arrow where to go. (I was actually going to use Cartesian Coords believe it or not!!!!) Thanks a lot! |
