I am attempting to make a defensive structure that attacks multiple units very quickly. Every time the structure attacks, I want it to choose a random unit within range to shoot at. I have absolutely no idea how to do this, but it looks like I need a "Search Area" effect (also kinda clueless on that one). Can anybody help me out here?
Sounds similar to the approach used by the Point Defense Drone. Its weapon simply initiates a Search Area effect to apply a Modify Unit effect to nearby not-invulnerable missiles. If you want the structure to behave similarly, it's easy, and you can use the Point Defense Drone's weapon and effect tree as a reference.
Okay, this is great, but now the structure attacks all units in range, rather than just attacking one at a time. Could you (or somebody else, of course) possibly post a map with the relevant stuff? If not, how do I make the structure choose a random unit from the units that it can attack?
Edit: One more thing: can I set this up so adding additional attacks to the weapon makes it attack two enemies at a time?
This is most likely because the search effect does not have a limit on how many units to attack. go to the Search effect area, and set the aximum targets to 1.
I just did that, but now it is attacking normally. Rather than spreading the attack, it focuses on one unit until it is dead, then moves on to the next.
I am attempting to make a defensive structure that attacks multiple units very quickly. Every time the structure attacks, I want it to choose a random unit within range to shoot at. I have absolutely no idea how to do this, but it looks like I need a "Search Area" effect (also kinda clueless on that one). Can anybody help me out here?
Sounds similar to the approach used by the Point Defense Drone. Its weapon simply initiates a Search Area effect to apply a Modify Unit effect to nearby not-invulnerable missiles. If you want the structure to behave similarly, it's easy, and you can use the Point Defense Drone's weapon and effect tree as a reference.
Okay, this is great, but now the structure attacks all units in range, rather than just attacking one at a time. Could you (or somebody else, of course) possibly post a map with the relevant stuff? If not, how do I make the structure choose a random unit from the units that it can attack?
Edit: One more thing: can I set this up so adding additional attacks to the weapon makes it attack two enemies at a time?
@UniEdit: Go
This is most likely because the search effect does not have a limit on how many units to attack. go to the Search effect area, and set the aximum targets to 1.
I just did that, but now it is attacking normally. Rather than spreading the attack, it focuses on one unit until it is dead, then moves on to the next.
You need to use TSRandom under the target sorts.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg