Staredit Network > Forums > SC2 Assistance > Topic: [Solved] Remove All Units
[Solved] Remove All Units
This topic is locked. You can no longer write replies here.
May 2 2010, 4:31 am
By: Swampfox  

May 2 2010, 4:31 am Swampfox Post #1



Could someone enlighten me in the ways of removing ALL of a type of unit for a certain player?

ex. Remove/Kill all (Marine) for Player (1)

In my tron game, I need the line to be removed after you die, which is comprised of a bunch of units :(



None.

May 2 2010, 4:05 pm Morphling Post #2



First create a variable with the type Unit group:
Code
Unit Group Variable = (Empty unit group) <Unit Group>

Next, in the trigger where you create your marines add this action after each creation:
Code
       Unit Group - Add (Last created unit) to Unit Group Variable

This is the action to remove the units:
Code
       Unit Group - Remove all units from Unit Group Variable




None.

May 2 2010, 11:02 pm Swampfox Post #3



Quote from Morphling
First create a variable with the type Unit group:
Code
Unit Group Variable = (Empty unit group) <Unit Group>

Next, in the trigger where you create your marines add this action after each creation:
Code
       Unit Group - Add (Last created unit) to Unit Group Variable
I was already experimenting with these things.

Quote from Morphling
This is the action to remove the units:
Code
       Unit Group - Remove all units from Unit Group Variable
Damnit. I saw that function, but I kind of figured it only removed the units from the VARIABLE, not the map....

I believe the above statement is correct. I think the units are only removed from the unit group, not the map.

EDIT: Ok wtf. For some reason, I'm having trouble adding units to my unit group. I really don't understand why none of this crap is working. Any ideas?


EDIT: Nvm.... I had unit group set to 'No Unit Group' instead of 'Empty Unit Group'. :><: Lock topic now if you wish.

Post has been edited 4 time(s), last time on May 3 2010, 2:34 am by Swampfox.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[03:22 am]
Symmetry -- because there's also Starforge 2 and chkdraft
[03:22 am]
Symmetry -- oh that's the one that was linked
[03:22 am]
Symmetry -- https://scmjs.dev/editor/ in browser editor that came out this year too :hurr:
[03:20 am]
Symmetry -- that's not even all
[12:06 am]
Vrael -- Did I misplace a 0 or something? Is it actually 2006 right now?
[11:05 pm]
ihjel -- At least two; MindArchon released one aswell https://staredit.net/topic/18926/
[10:52 pm]
Vrael -- Whoa cool a new map editor in the year *checks notes* 2026?
[02:16 pm]
ihjel -- A whole army of vacuum cleaners have signed up for the wiki
[2026-11-06. : 11:00 am]
UndeadStar -- I want to commend bots for finally finding the Introductions subforum. But those huge blocks of text sometimes interrupted by a link? That's a regression compared to the other bots.
[2026-11-05. : 6:38 pm]
*l)ark_ssj9kevin ********
Please log in to shout.


Members Online: NudeRaider, fasswawds