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

[General] AI: cast spell on Hero, not Creep.

Status
Not open for further replies.
Level 4
Joined
Oct 28, 2012
Messages
82
Like title. ( edit: need a spell, AI only cast on hero, not creep)
I have one solution is make spell have order: Soul Burn.
AI have that spell will cast on hero only.
I can use it for many hero, but cant use twice on 1 hero.
So I need more, 2 or 3 is better
 
Last edited:
Level 4
Joined
Oct 28, 2012
Messages
82
I read that :D Thank.
But it doesn't help much.
Since the only thing that I notice is Storm Bolt, he say AI preference to target heroes, but in my map, AI really like to spam it on creeps.
 
Level 9
Joined
Dec 12, 2007
Messages
489
if you really need it to only cast on Hero, why not make it only able to target Hero by the Object Editor? the default AI won't cast it to non Hero that way, unless there's a need to be able to target non hero but the AI is not allowed.
 
Level 25
Joined
Sep 26, 2009
Messages
2,381
You could make a generic trigger which fires when a unit is issued an order, check if the order == spell id and target == creep (or target != hero). If conditions are true, order triggering unit to stop.

--- however I'm not sure if the AI just won't try to cast it immediately again (in this case, you could just make a little bit of AI yourself - like ordering the triggering unit to attack nearby enemy, or do something else if another conditions are true)
 
Level 4
Joined
Oct 28, 2012
Messages
82
^Nichilus
Your idea is good. I will try to do it.
Like this ?
  • Untitled Trigger 010
    • Events
      • Unit - Uchiha Traitor 0040 <gen> Is issued an order targeting an object
    • Conditions
      • (Current order of Uchiha Traitor 0040 <gen>) Equal to (Order(darkconversion))
      • ((Target unit of issued order) is A Hero) Equal to False
    • Actions
      • Unit - Order Uchiha Traitor 0040 <gen> to Stop
      • Player - Disable Amaterasu for (Owner of Uchiha Traitor 0040 <gen>)
      • Wait 1.00 seconds
      • Player - Enable Amaterasu for (Owner of Uchiha Traitor 0040 <gen>)
^Dark_Axl
You get a point, but like a dota map, that hero can be play by user or computer, and it cause primary damage but it can use for farming. User know when to farm, when to save it for combat, but AI's not.

---
 
Level 9
Joined
Dec 12, 2007
Messages
489
well based on my finding in my current project,
it seems that AI prioritize Hero over non-Hero in selecting spell target or any activation,
all abilities in my map is based on Finger of Death, Immolation, Berserk (Unit ability), Carrion Swarm, Fan of Knives.
those abilities is only cast on enemy Player units and prioritize Hero over non-Hero if there's any.
However, it seems the AI didn't use any ability and just attacking neutral hostile unit.
maybe you can test those abilities too.
 
Level 4
Joined
Oct 28, 2012
Messages
82
It's true that AI prioritize Hero over non-Hero in selecting spell target or any activation.
But in this situation, sometime AI have a moment to farm ( and there are no hero in "800" around AI ) so, in that moment, he will use spell to farm .
Creep in my map is player 4/8/12.
-
I use ManaBurn to force AI cast on Hero ( who have mana ). but problem still there, a kind of creep have mana.
 
Status
Not open for further replies.
Top