• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece!🔗 Click here to enter!

Tower Prioritize Certain Enemies

Status
Not open for further replies.
Level 16
Joined
Mar 27, 2011
Messages
1,349
I'm making a tower defence map and I want certain towers to prioritize certain units before others. To help paint a picture. Imagine there being a hundred weak units and a boss unit amongst them. When my towers decides who to attack, I want it to attack the boss.

I've looked at unit priority as outlined in this thread (Unit Stats - "Priority"), but this seems to do nothing. I set the boss to a high priority like 20 and weak units as 1 but my tower seems to simply attack whichever unit is closest.

Could I be missing something? Has anyone confirmed that priority works?
 
Level 25
Joined
May 11, 2007
Messages
4,651
Priority affects which unit will be show as the selected unit when selecting multiple units, it doesn't affect the attack order.
You could try and set the low trash units to be workers, I think the AI of the units prioritze units over workers when attacking.

If that doesn't work, you'd have to trigger it.
 
Level 16
Joined
Mar 27, 2011
Messages
1,349
You could try and set the low trash units to be workers, I think the AI of the units prioritze units over workers when attacking.

This is working. I noticed towers will even cease attacking a unit when a non worker comes in range.

Pick every boss type unit
Order every tower in maximum tower range to attack him

I initially thought of doing this. It would allow more control over the aforementioned strategy, but might take more processing resources.

I'll weigh up the 2 different approaches. Thanks guys.
 
One problem with units with a "worker" classification is that they don't automatically acquire targets, they flee instead, and if set to not flee, they might not even attack, so unless you have triggers specifically telling worker-classed units to attack, you shouldn't set attacking units to be workers.

You either have to trigger worker-classed units attacking, or towers attacking. But either approach will work.
 
Level 25
Joined
May 11, 2007
Messages
4,651
Well he is making a tower defense map, not that many units that attack in them. Unless for blocking, but line tower defense just had an invulnerable guy run through it once in a while, killing shit if he didn't get out.
So having worker as a classification works. Keep it simple! :)
 
Status
Not open for further replies.
Top