Thursday, April 19, 2012

Why wont the enemy units use their abilities properly or even at all?

Ok, here's the deal. I have a several boss units that wont use abilities i give them. Let's use the following boss unit of mine as an example;

I have a boss unit called Anub'Rekhan. He has two abilities, Locust Swarm and Impale. Both have been modified to deal a lot more damage than normal, they both cost 0 mana and they are both now unit abilities rather than hero abilities.

However, i can go through his entire engagement (he has 35,000 life which takes about 5 minutes to burn through at my parties current equipment) and he wont use Locust Swarm even once. I have seen him use Impale, but only at random occasions and not fitting with its cooldown cycle.

Any ideas? |||I'm just making this up, but I'm pretty sure that every spellid has a specific AI that controls its use. For example, any unit with "Sorceress Slow" will cast slow under only the conditions that a sorceress in a melee game will use slow. Those conditions happen to be a nearby unit attacks a friendly. Another example is warstomp. Warstomp is only used by the computer when 3 or more units are close enough to get stomped. No matter what you do to that spell, it won't get cast under different conditions.

That said, you can set up your own conditions and force cast the spell. It's a lot of work, it's basically designing an AI for each boss, but how else could it be? The computer has no way of knowing the best way to cast whatever custom spell you come up with. You have to make that part yourself. The basic tool would be "Unit - Issue Order Targeting ____" and "Event - Unit within range of Unit". Other events are useful, too, but these would be starters.

No comments:

Post a Comment