• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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