HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Mass Army Custom AI Help

06-20-2004, 03:53 AM#1
Dsaber
I've been working on a trigger that basically commands a Unit group, which is the entire map of 200+ units, to destroy a destructible doodad gate, and move on to a designated area. I want those units to Attack any enemies they see. So this is what i did and it didn't work.

Event: Time - Every 10 seconds of game time
Condition: None
Action: Unit Group - Pick every unit in (Units owned by Player 2 (Blue)) and do (Unit - Order (Picked unit) to Attack-Move To (Center of Region 008 <gen>))

I did this. And the attacks tend to Stop, Go, Stop, go. What can i do to smoothen these commands out? I tried just one command instead of a periodic event, still Stop, Go, Stop, Go.

At Region 008, I set a trigger that makes it so that the entering unit attacks the gate instead. (If I had set the unit to simply attack the gate from the beginning, it would ignore any enemies in front of it). That didn't work too well as my region wasn't big enough I think. Help here too?

Later on I plan on making a battle where the AI uses squads of 12 to do important manuevers. I plan on using Unit Group Variables and simply attack move to regions... but if its stop, go, stop, go... that won't work... any help?
Also, when they stop... they don't attack anything, they just sit there and die.

Btw, I really don't know anything about Jass or AI scripting... T_T
Great FAQ btw....
help?
Dsaber
06-20-2004, 01:09 PM#2
AIAndy
Your problem is that Blizzard limited the amount of pathing computing time of a player. So if one player gives too many orders you get the result your described.

There are several ways I can think of to reduce this problem:

1) Since it is more expensive to compute pathing if the target point is further away, split the entire move into submoves to regions. That way pathing will be cheaper and likely you will see less stop and go.

2) Instead of ordering every single unit, split them up in groups of 12 and order them. I am not 100% sure that will help to make pathing cheaper though (depends on the algorithm Warcraft uses so best just try it out).

3) Since this pathing limit is separate for each player, split the units up on several players.
06-20-2004, 01:39 PM#3
Dsaber
Thanks, I'll try that. ^_^

Another question while I'm at it.
Is there anyway to get computer AI to use Custom Spells or abilities on their own? Like a custom version of bloodlust that they use when they just view an enemy.

Thanks again,
Dsaber
06-20-2004, 07:44 PM#4
AIAndy
They should by themselves use the spell in the same way as they would use the spell it is based on. Of course that might not be the right way in many cases. You can always add a trigger to make them cast it.
06-21-2004, 02:29 PM#5
Dsaber
Thx, but it still doesn't work. What do you mean a Trigger that can do it? How would i set it up?

Event - Unit would come into range of blah unit
Condition - Entering unit does not = player unit
Action - Unit cast blah blah