• 🏆 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!

[Solved] Having AI not moving but still using spells

Status
Not open for further replies.
Level 8
Joined
Oct 2, 2013
Messages
288
In a standard AOS map, if I apply a computer to the spawning units they will gracefully use their abilities if they have any. This is great!

But I noticed that in some rare cases the units are ordered to move back to where they came from.
I have managed to fix this by having a periodic timer checking for these units and making sure they are ordered to attack-move to their intended destination, but it's not a 100% perfect solution.

Is there a way to tweak the AI to just not moving units at all and only using spells?

Thank you so much for looking into this!:)
 
Level 8
Joined
Oct 2, 2013
Messages
288
Does it only happen when a unit is stunned? if that's the case then after stun they stop their order and just go back to their location. Make a trigger to order target of ability to attack move to your destination.

I have triggers to act upon spell casting, stuns and ect. Thanks for noting it though.

It happens seldomly and it can really be any unit at any time from what I have observed. To be fair it's not a huge deal or consequential, it's just slightly annoying.
 
Level 12
Joined
Nov 3, 2013
Messages
989
Thank you everyone. That solves my problem! :D
You used ignore guard position, but the units still cast spells as usual?
The units won't cast spell anymore though, or is there a way to keep them casting?
That has been my experience as well... Only exception would be auto-cast spells like bloodlust, inner fire, etc. (assuming that they're toggled on), but the AI won't use any other abilities.
 
Level 8
Joined
Oct 2, 2013
Messages
288
Sorry for the late reply. I have tested the units casting different abilities such as Blizzard and even reviving from spells like Resurrection seems to work just fine. I will point out though that I have additional triggers for these things but the problem before was that the unit would actually try to go back. Now they remain idle which is good cause they can just be reordered by detecting idle units.
 
Status
Not open for further replies.
Top