
We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch
Quote from name:Deathman101
I believe that the default AI for Computer controlled units is that they will follow their target to an extent (their sight range I think), then they will go back to their starting spot.
That is true, but not for heroes. Heroes always follow you around indefinitely and just stop if you teleported or died.
So he could take ultralisks for example instead of infested kerrigans.
I concur. Player (human) brings at least 1 [any unit] to boss location, Move location player to (unit) owned by Player (human), Order all Infested Kerrigan owned by player (enemies) at boss location attack to player, preserve trigger.
Player (human) brings at most 0 [any unit] to boss location, Order all Infested Kerrigan owned by player (enemies) move to kerrigan default location, preserve trigger.
No AI script involved. No reason to overcomplicate things.
The problem with ordering is that it only works for all kerrigans to one location, instead of each of them to a different one.
You can solve that by following each of the kerrigans by a 1x1 pixel location.
The trigger for this is simple:
C: Always
A: Center 'pixel 1' on kerri at 'pixel 1'
A: Center 'pixel 2' on kerri at 'pixel 2'
A: ... etc. for all 8
You need hyper triggers for that.
Once that is done you can program your own little boss AI by using triggers. Some examples:
Your original request:C: Player Force brings at most 0 men to 'boss'
A: Order Kerrigan at 'pixel 1' move to 'start kerri 1'
A: Order Kerrigan at 'pixel 2' move to 'start kerri 2'
A: ... etc. for all 8
Prevent players from splitting forces and attack undefended rear:C: Player Force brings at least 1 men to 'north entrance'
C: Computer defender brings at most 1 kerrigan to 'northern hemisphere' *)
A: Order Kerrigan at 'pixel 1' move to 'start kerri 1'
A: Order Kerrigan at 'pixel 2' move to 'start kerri 2'
A: ... etc. but only the 4 kerris that originally started north of the boss
*): Make 2 extra locations covering the south and north half of the boss
A trigger set to stop kerrigans from going too far, without ordering all of them back:C: Always
A: Subtract 1 from death count timer
C: Computer defender brings at least 1 kerrigan to 'outside boss' *)
C: Death count timer is at most 0
A: Create 1 burrowed ling at 'pixel 1'
*): This location is slightly larger than 'boss'
C: Computer defender brings at most 0 lings to 'boss'
C: Death count timer is at most 0
A: Order kerrigan at 'pixel 1' move to 'start kerri 1'
A: Set death count timer to 8
A: Remove all lings for Computer defender
C: Computer defender brings at least 1 lings to 'boss'
C: Death count timer is at most 0
A: Remove all lings for Computer defender
A: Create 1 burrowed ling at 'pixel 2'
C: Computer defender brings at most 0 lings to 'boss'
C: Death count timer is at most 0
A: Order kerrigan at 'pixel 2' move to 'start kerri 2'
... etc. there's always one trigger creating a ling and another checking where that ling is.
As you can see I put together the "no ling found at this location"-trigger and the "create ling for next kerri if ling was not found"-trigger. Ofc you will need to do them for all 8 kerris.
I added a death count timer condition so that if one kerri is found outside she's not ordered back all the time, as this would slow down lower numbered kerris. (constantly creating burrowed units under a unit slows it down.)
These are only a few examples of what you can do with that method. You could also add a 2nd, larger location following each kerri to detect if this kerri is currently engaging an enemy. The possibilities are endless. The more effort you put into triggering the more intelligently your boss will fend off the attackers.