• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Solved] Need help with trigger removing all units except main unit.

Status
Not open for further replies.
Level 9
Joined
Jul 11, 2009
Messages
294
Hey guys,

I've been away from map making for quite a couple of years, so I've completely lost touch, recently being back on map making I would require some help.

I need a trigger that helps me removes all buildings and units owned by player red except one unit.

E.g : Player red controls the drug smuggler, drug smuggler is arrested and sent to jail. I want to remove every building and unit that player red owns except the main drug smuggler which should stay in jail.

How can I do so?


Thanks in advance. :thumbs_up:
 
Level 9
Joined
Jul 11, 2009
Messages
294
use a temp unit group that covers all units owned by the player you want except the unit that you don't want. Then remove units in the group loop

Ahh, I managed to fix it with the advice you gave. I can't rep you again since I just repped you yesterday. Would definitely do so when I can.

Thanks!


Yes, Pick every unit owned by the player matching condition. And the condition is matching unit not equal to your unit. Or unit type of matching unit not equal to smuggler.

http://www.hiveworkshop.com/forums/triggers-scripts-269/things-leak-35124/

I managed to fix it and make sure there are no leaks! Thanks! +REP :thumbs_up:
 
Status
Not open for further replies.
Top