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.
[07:41 pm]
Ultraviolet -- just sent you a message on Discord. I suspect you're probably trying to change unit speeds for units that don't use flingy.dat for movement (like any units that walk instead of hovering/flying). You can change their movement to flingy, but they unfortunately look more like they're gliding than walking when you do that.
[07:31 pm]
Symmetry -- EE2, I've been using setdatfile successfully for units.dat and weapons.dat but the flingy changes don't seem to happen
[05:25 pm]
Ultraviolet -- in EE2 you just open DatEdit, go to the flingy tab, and make whatever changes you want. Though if you want to do dynamic shit, you have to use the trigger editor with the setdatfile action. And of course you have to inject your changes when done. Can give more specific troubleshooting advice if you provide more details
[05:20 pm]
Ultraviolet -- Symmetry
Symmetry shouted: why can't I seem to make eud editor change flingy.dat D:
Are you using EE2 or EE3?
[04:57 pm]
Symmetry -- wdym
[02:24 pm]
Apos -- :wob:
[04:16 am]
NudeRaider -- files in c:\program files\ are protected
[2026-7-11. : 8:11 pm]
Symmetry -- why can't I seem to make eud editor change flingy.dat D:
[2026-7-11. : 4:33 pm]
Ultraviolet -- :wob:
[2026-7-10. : 11:00 pm]
Vrael -- :wob:
Please log in to shout.


Members Online: O)FaRTy1billion[MM], lil-Inferno, Symmetry