Staredit Network > Forums > SC2 Assistance > Topic: Kill specific unit type in a region
Kill specific unit type in a region
Sep 18 2011, 9:29 am
By: GhostChenmo  

Sep 18 2011, 9:29 am GhostChenmo Post #1



I am making a custom map and I need to kill a certan unit type in a region. I cannot make a trigger to kill each unit individually because theres too many so how can I make a trigger that will kill off the specific unit one by one?

Edit: I would also like to mention that from researching this it is suggested to use unit strings to refer to a unit and I have tried that by typing in the unit name but after testing the trigger seems to ignore it. I am not sure but I think I am using the wrong trigger action to refer to the unit type with a string.

Post has been edited 1 time(s), last time on Sep 18 2011, 9:35 am by GhostChenmo.



None.

Sep 18 2011, 12:12 pm Roy Post #2

An artist's depiction of an Extended Unit Death

So you want to kill all units of a specific type in a region? You can "Pick Each Unit in Unit Group" in a "Units in Region Matching Condition," where your matching condition is the unit type:

Unit Group - Pick each unit in ((Unit type of UNIT_TYPE_TO_KILL) units in KILLING_REGION owned by player Any Player matching Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
    Actions
        Unit - Kill (Picked unit)


This will kill all units of a specific type in a specific region instantly. You can add a wait in the unit group actions if you want them to die one-by-one.




Sep 19 2011, 4:30 pm GhostChenmo Post #3



Ok that worked. Does anyone know if there is a way to have a variable that defines "Any Player" so i can use it with all of the triggers.



None.

Sep 19 2011, 4:32 pm NicholasBeige Post #4



If I remember correctly, in the field you can use a 'Preset' defined as 'Any Player'.

Alternatively, you could use an integer value and run a loop which references that integer as each player.

Something like:
For IntegerA from 1 to [number of current active players in game]
Do Actions
next IntegerA



None.

Sep 19 2011, 5:35 pm GhostChenmo Post #5



Well the field preset for any player only works for that one trigger from what ive seen. In the other triggers there is no preset for "Any Player"

Also the integer player thing was confusing. Do you have specific triggers I can look at to set that up.



None.

Sep 19 2011, 5:37 pm NicholasBeige Post #6



What is it 'exactly' you want this trigger to do that requires use of Any Player?



None.

Sep 19 2011, 6:01 pm GhostChenmo Post #7



Well its not that important I just mentioned it because sometimes I am making a trigger and I could use the "Any Player" preset but it isn't listed for that trigger. Theres none specifically though.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[10:18 pm]
Vrael -- who says I'm not a total madman?
[02: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
[2024-4-30. : 7:43 am]
NudeRaider -- Vrael
Vrael shouted: if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
Yeah I'm not a big fan of Westernhagen either, Fanta vier much better! But they didn't drop the lyrics that fit the situation. Farty: Ich bin wieder hier; nobody: in meinem Revier; Me: war nie wirklich weg
[2024-4-29. : 6:36 pm]
RIVE -- Nah, I'm still on Orange Box.
[2024-4-29. : 4:36 pm]
Oh_Man -- anyone play Outside the Box yet? it was a fun time
[2024-4-29. : 12:52 pm]
Vrael -- if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
Please log in to shout.


Members Online: Vrael, Oh_Man