| 03-10-2010, 11:35 PM | #1 |
I am making a map and you are able to have many archer units and this where the problem comes in. I would like the archers to attack multiple units at once instead of having fifty archers shooting the same unit. This is a problem when there are one-hundred enemies rushing and each would die from three arrows but all fifty archers are shooting one at a time. Could some one please tell me how to fix this. Thank You. |
| 03-11-2010, 01:09 AM | #2 |
You can't really change this unless you code the way archers attack/shoot their projectile (as in if their "attack" is a spell). Because ranged units in wc3 tend to shoot units even if they're about to die by an incoming projectile still in the air, you have to look for an alternative then changing their attack system (since that's pretty much impossible). The only way I see this being possible if you have no evasion-like items/spells in your map. Code the projectile that archers shoot (or detect when they release an arrow), and once an archer has been struck 3 times, make it unattackable/uncastable on or something so that other archers cannot attack it anymore. Otherwise, there's nothing you can do but manually micro all your archers to not attack one single archer at a time. |
| 03-11-2010, 01:18 AM | #3 | |
Quote:
Wrong. You simply have to recode target acquisition. Of course, that involves manually ordering units to attack other units, which fucks up queued orders. Of course, recoding target acquisition is no simple task, especially on the level you're talking about. It would involve a lot of math, a lot of logic, and a lot of optimizing insanely ugly JASS code. Even then, you may not end up with the performance required. |
| 03-11-2010, 04:13 AM | #4 |
phoenix fire pwnz |
| 03-11-2010, 08:31 PM | #5 |
phoenix fire suckz |
| 03-13-2010, 03:45 AM | #6 | |
Quote:
|
| 03-13-2010, 05:02 AM | #7 | |
Quote:
I mean disabling the unit's default target-acquisition mechanic by adding the peon classification to it, and recoding how a unit automatically selects targets when they are in a target-acquiring state. (Patrolling, near enough unit in hold position, standing there, etc.) |
| 03-13-2010, 08:53 AM | #8 |
You could use slow poison, and work that in. Units with slow poison prefer to attack uninjiured (and hence un poisoned) targets |
