• 🏆 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 items and use it.

Status
Not open for further replies.
Level 7
Joined
May 3, 2007
Messages
210
If you're importing an A.I. then use the A.I. API that gives a little more flexibility on the matter. If you however, doing what I imagine and have some custom hero that you want to buy and use, then you need something else.

Whatever the issue, you can likely fix it by putting event checks to determine when an A.I. is doing something near a shop or close to a shop and you want to override existing orders and have him go buy and use something appropriate. Or you could check the resource amount of the owning player. Or you could just do it intervals and have the A.I. go to the shop every so seconds.

Point being, you need to generate a detection in order to proc actions. The actions of course being "Move-to", "Purchase", "Use", "Continue-with-previous-action-queue".
 
Status
Not open for further replies.
Top