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

[AI] Buy a neutral hero

Status
Not open for further replies.
Level 6
Joined
Aug 22, 2008
Messages
123
Hello everyone

I guess nobody can help me with that problem, but if you can, I would be really glad.

My AI should be able to pick a hero out of a neutral tavern. In some tests I found out that
Code:
call IssueNeutralImmediateOrder(ai_player, Tavern, "beastmaster")
worked in testmaps, but not for my running AI. The problem may be that orders in AI scripts cannot be given to units the AI does not own, but I don't want to resign on this point since heros can even buy items in shops and ordering neutral buildings should be definately possible. Anybody got an idea?:wink:
 
Level 9
Joined
Nov 4, 2007
Messages
931
The only workaround I can really think of is to just create the hero for the AI player once it passes through certain conditions (food limit, gold/lumber, hero limiters, near tavern).
 
Status
Not open for further replies.
Top