• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Avoid computer using items

Status
Not open for further replies.
Level 9
Joined
Apr 19, 2011
Messages
447
Hi there.

I have been working on a hero arena-type of map, and I recently started to create some AIs, so the game offers some kind of challenge even without human players. However, I found that the computer is using certain items when I don't want him to use them.
For example, I order the computer to buy some Healing Potions (healing 250 each). I want the computer controlled heroes to use the potions when their health goes under 10%. However, they are using them whenever they lose those 250 health points I mentioned earlier. They completely ignore the AI I programmed and act on their own. This doesn't happen just with Healing Potions, also with Mana Potions, and any other health or mana recovering item.

Maybe this is a silly question, but I don't know how to avoid this behaviour. I had a look at the forums, but I didn't find anything like this.
Can someone help me?

Kind Regards
 
Level 6
Joined
Feb 5, 2012
Messages
1,685
I like creating AI and i encountered this a lot.

This problem occured because Warcraft Abilities including item abilities will be auto used by Computered Controlled AI due to its base abilities.

For example if you have an item with the base ability of thunderclap. Any AI hero who is weilding that item will use it if there is more than 3 enemy around that AI. Even If if you won't command it.


To answer that problem you need a customized health potion ability which based on CHANNEL. And because of that you need to trigger the ability of health potion.

So yeah use CHANNEL as base ability if you want that ability to be used only in an specific situation by the AI.
 
Status
Not open for further replies.
Top