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.
[02:53 am]
Mr.BurnLiquid -- Symmetry
Symmetry shouted: I'll check it out this weekend!
Thanks
[02:47 am]
Symmetry -- I'll check it out this weekend!
[02:40 am]
Mr.BurnLiquid -- Symmetry
Symmetry shouted: Another map maker? Damn we really ARE back
I invite you to try out the map I modified. I don't have the creativity to create maps from scratch, but I do have the know-how to modify existing ones; my project is to tweak community campaigns (specifically those with errors—to make them playable.
[02:27 am]
Symmetry -- Another map maker? Damn we really ARE back
[01:51 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: Mr.BurnLiquid actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
Now that I wanted to change my avatar, the error image is showing up, haha.
[01:34 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: Mr.BurnLiquid actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
Mr.BurnLiquid
Mr.BurnLiquid shouted: Ultraviolet Thanks; I'm new to the site and a Spanish speaker. I must have missed the part where it was prohibited—I'll change it now.
I invite you to try out a mission I'm modifying from *StarCraft Reversed*; I'm trying to make it more playable and challenging.
[01:33 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: Mr.BurnLiquid actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
Thanks; I'm new to the site and a Spanish speaker. I must have missed the part where it was prohibited—I'll change it now.
[01:31 am]
Ultraviolet -- Mr.BurnLiquid
Mr.BurnLiquid shouted: Ultraviolet Is it forbidden to have a large avatar?
actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
[12:20 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: https://staredit.net/profile/133367/ dude's avatar is massive
Is it forbidden to have a large avatar?
[12:04 am]
Ultraviolet -- https://staredit.net/profile/133367/ dude's avatar is massive
Please log in to shout.


Members Online: City, sarahtaylor