HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

AI attack behaviour

12-12-2003, 07:47 AM#1
Tommi
Hi folks!

I was trying out simple AI attack patterns with a single hero on both sides. Computer had lvl 10 mountain king, I had lvl 10 archmage. I ordered the computer to attack a specific location by establishing an assault group and delpoying either AttackMoveXY, AttackMoveXYA, or SuicideOnPoint (in different tests each).

However, there was a problem. After encountering my archmage in midway, the computer attacked once and then turned back and ran to its starting location.

What's the problem with the computer? How can I force it to continue the attack until the target point is reached?

Cheers,

Tommi
12-12-2003, 12:06 PM#2
AIAndy
That ÃÂ*s one of the strange hard coded fleeing behaviors. He considers heroes as support units and always flees when he only has a hero.
Now what you can try is disable the fleeing (SetGroupsFlee) but that might cause him to fight strangely.
Or as an alternative give him a fighting unit along with the hero so he does not think he is fighting alone.
You can try to make the captain position visible to see what he is doing as that might be related to the problem. That reminds me of another way that might work. Set the captains home to the position of the hero every x seconds.