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

Computer abilites

Status
Not open for further replies.
Level 2
Joined
Mar 10, 2010
Messages
16
Hey I'm back with yet another problem!
In my map the computer controls enemy units that cast spells. When I engage them they automatically cast the spells they have, no problems there. However once they run out of mana they stop casting even after the mana regenerates. The same thing applies if the unit gets silenced. Even after the silence effect is gone they never cast any more spells.

Could anyone offer some assistance on how to make it work?
 
Level 3
Joined
Jan 9, 2010
Messages
34
Then, that must be some flaw of AI (which I've never heard of before). Try implementing a Damage Detection System that, once the unit takes damage, if it has mana greater than or Equal to X, order it to cast the spell.

That means if there are multiple targets and among those two caster units, one of them might not cast because it is not taking damage. Therefore it should be set to: taking damage or attacking
 
Status
Not open for further replies.
Top