Staredit Network > Forums > SC2 Assistance > Topic: "Send All Units on Random Suicide Missions"
"Send All Units on Random Suicide Missions"
Aug 15 2010, 5:35 pm
By: Blah  

Aug 15 2010, 5:35 pm Blah Post #1



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.

Aug 16 2010, 3:15 am shmeeps Post #2



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:

Code
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:

Code
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:

Code
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.

Aug 16 2010, 7:03 pm Blah Post #3



Thanks, that works.. for now.



None.

Aug 17 2010, 4:33 am Deev Post #4



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.

Aug 17 2010, 4:44 am shmeeps Post #5



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.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[10:53 pm]
Oh_Man -- https://youtu.be/MHOZptE-_-c are yall seeing this map? it's insane
[2024-5-04. : 1:05 am]
Vrael -- I won't stand for people going around saying things like im not a total madman
[2024-5-04. : 1:05 am]
Vrael -- that's better
[2024-5-04. : 12:39 am]
NudeRaider -- can confirm, Vrael is a total madman
[2024-5-03. : 10:18 pm]
Vrael -- who says I'm not a total madman?
[2024-5-03. : 2:26 pm]
UndeadStar -- Vrael, since the ad messages get removed, you look like a total madman for someone that come late
[2024-5-02. : 1:19 pm]
Vrael -- IM GONNA MANUFACTURE SOME SPORTBALL EQUIPMENT WHERE THE SUN DONT SHINE BOY
[2024-5-02. : 1:35 am]
Ultraviolet -- Vrael
Vrael shouted: NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
Gonna put deez sportballs in your mouth
[2024-5-01. : 1:24 pm]
Vrael -- NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
[2024-4-30. : 5:08 pm]
Oh_Man -- https://youtu.be/lGxUOgfmUCQ
Please log in to shout.


Members Online: Ultraviolet, O)FaRTy1billion[MM]