• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Any way to make AI ignore locust units?

Status
Not open for further replies.
Level 12
Joined
May 22, 2015
Messages
1,051
I have these locust spirit units that have phoenix fire for their attack. They are not controlled by the player who gets them directly, but they are instead controlled via some spells and abilities (just tells them where to go, really).

Anyway, the issue I am having is that the AI sometimes sees these units as "targets". It is mainly a problem for the Spawn Tentacle spell, which has proven itself very useful when trying to get AI to aim their spells at enemies. The problem is that the AI will cast Spawn Tentacle based abilities at these locust spirits which cannot even be harmed by anything.

It's a waste of their mana / spell and even causes deadlock in the AI sometimes where they run up, cast a spell, try to return to their spawn point, and by the time they get back to the locust units again, their spell is ready.

I have some work arounds, but I'm wondering if there is some way I can make the AI not treat these units as something they can hit with Spawn Tentacle. Maybe switching the locust unit "targeted as" field will work.
 
Level 12
Joined
May 22, 2015
Messages
1,051
Normally you can't target the locusts. I don't think the AI can, either, but they do think they are threats when they go to case spells based off of Spawn Tentacle.

I supposed I could make the spirits invisible to the enemies (which is just one CPU player). It shouldn't change anything and it will just make the spirits have some transparency which isn't a big deal. I will maybe try that.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Spawn Tentacle targets ground, and the AI was designed to spawn it under enemy units. The problem is that the AI does not exclude Locust units from its search.

The reason this happens is probably due to its intended use. The ability and its AI were created for one specific TFT boss battle in the campaign where the area was very limited and half the difficulty was the tentacles spawning under you. Further more Anubarak's ultimate has such a long cooldown its decoying properties were of minimal help, but maybe purposely helpful to make the battle just a bit easier. The result is the ability will be cast at locust units.

Is this unique to the ability? It is possible other AI abilities do correctly handle locust because of melee gameplay reasons. It is also possible that many do not, with the AI happily casting AoE damage moves on Locust units but people never notice. Some AI abilities do not care if a unit is locust or not as they simply cannot target locust units.
 
Level 12
Joined
May 22, 2015
Messages
1,051
I cast my abilities when i want and not when the AI want. All my abilities are based on "channel". I don't have any problem with locust units and if yes, i would remove them from the target group.

Ya I've been relying on the AI to cast spells. Maybe one day there will be a good AI system for the enemies in my map, but I'd rather continue as is, if possible. I'll just need to find some kind of work around for now.
 
Level 7
Joined
Nov 19, 2015
Messages
283
Normally you can't target the locusts. I don't think the AI can, either, but they do think they are threats when they go to case spells based off of Spawn Tentacle.

I supposed I could make the spirits invisible to the enemies (which is just one CPU player). It shouldn't change anything and it will just make the spirits have some transparency which isn't a big deal. I will maybe try that.

Is this is the route you are going, I think there is a ghost ability that makes your units invisible but not transparent. I think it was ghost (visible) or something
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Someone teach me about this spawn tentacle thingy
It is the ability of the Forgotten One from the Undead campaign in Frozen Throne expansion. It spawns a unit at the target point, by default a Forgotten One Tentacle. Since this was a boss fight, the ability features in-built tactical AI to cast on units if under the control of a computer player. This made the boss fight quite fighting as you had tentacles constantly spawning under you and you only had like 2 units to fight it with.

The problem is that it does not validate the target unit if it is at all appropriate to spawn a tentacle under. It will happily spawn them under locust/invulnerable units.
 
Level 7
Joined
Nov 19, 2015
Messages
283
It is the ability of the Forgotten One from the Undead campaign in Frozen Throne expansion. It spawns a unit at the target point, by default a Forgotten One Tentacle. Since this was a boss fight, the ability features in-built tactical AI to cast on units if under the control of a computer player. This made the boss fight quite fighting as you had tentacles constantly spawning under you and you only had like 2 units to fight it with.

The problem is that it does not validate the target unit if it is at all appropriate to spawn a tentacle under. It will happily spawn them under locust/invulnerable units.

Ahh, I see. An it also happens to spawn in a region of the most units for optimal AOE (except for the locust bug).

I think this is why my phaseshift is bugging out, due to this build-in tactical AI. The computer casts it whenever they take damage even when not on autocast.

Another solution could be to pick all your locust units and check the distance between them and the target point. This gets past the unable to target locust units.
Does it come up as an issued order command? You could see if you can pick up the order, especially if its a target unit order.
 
Level 12
Joined
May 22, 2015
Messages
1,051
Ahh, I see. An it also happens to spawn in a region of the most units for optimal AOE (except for the locust bug).

I think this is why my phaseshift is bugging out, due to this build-in tactical AI. The computer casts it whenever they take damage even when not on autocast.

Another solution could be to pick all your locust units and check the distance between them and the target point. This gets past the unable to target locust units.
Does it come up as an issued order command? You could see if you can pick up the order, especially if its a target unit order.

I don't think capturing the bad targeted spell will work for me. I'd have to then tell the unit to try to continue what it was doing (need to keep track of that better than I currently do for this and that is some work) and I don't know if it will stop them from just immediately trying the same thing again. I'd rather not stop the AI this way because it will look clunky in-game.

I'll try the invisible stuff (and the ghost (visible) thing) and see what happens. I haven't tried these things before. I still haven't implemented a solution because I got distracted lol. I'll post back when I find anything out.
 
Status
Not open for further replies.
Top