Most of you are most likely familiar with SC1 Ai script called "Send All Units on Random/Strategic Suicide Missions", so I'll cut the explaining and ask: how I can do that in sc2?
I'm working on map that has a lot of zerglings as enemies and those zerglings should attack to random targets instead of going as one big lingball to one target. Does anyone have any idea/experience how to do this in sc2? I have tried many different methods and each has failed in some way.
None.
There's two basic ways to do it, the first to make the unit attack move to the position of a random enemy unit, and to enable suicide.
The first method is based off of this trigger:
Unit - Order (Last created unit) to ( Attack targeting (Position of (Random Living unit from (Units in (Entire map) having alliance Enemy with player 15 matching Excluded: Missile, Dead, Hidden, with at most Any Amount)))) (Replace Existing Orders)
Basically, it just picks a random unit from the enemies of the given player (in this case, player 15), and orders the last created unit to attack to that position. (We don't target the unit, as then the suiciding unit may ignore units attacking it between it and the unit it is targetting.
The second method is pretty simple as well:
At Map Initialization, use the following action:
AI - Start the campaign AI for all computer players
AI Advanced - Set the APM count for player 15 to 1000
Then, on unit creation, do the following:
AI - Enable suicide for (Last created unit)
AI - Suicide all player 15 units
This enables suicide mode for the unit, and the second action triggers all units flagged to suicide to attack the closest unit, and re-direct to any unit it finds or that attacks it.
None.
Thanks, that works.. for now.
None.
I found this describtion while reading some of the build-inf definitions on triggers. This made me laugh..
Trigger: Enable/disable suicide for unit group
- If suicide is enabled for a unit group, the AI will immediatly seek out and repeatedly attack the nearest enemy until the suiciding unit group is destroyed. Setting a bully to suicide
will tag it as missing and cause the AI to rebuild it, since it should not be returning alive.
None.
No longer needed, in response to a question as to how to issue a unit to attack:
Click on the parenthesis immediately before Ability Command IE "Unit - Order (Triggering unit) to
(Ability Command) (Replace Existing Orders)", and change that function from Order With No Target to Order Targeting Unit or Order Targeting Point.
Post has been edited 1 time(s), last time on Aug 17 2010, 5:18 am by shmeeps.
None.