• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[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