HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Removal of unowned units

12-01-2003, 02:45 AM#1
YellowSubmarine
I made a simple trigger action to remove units owned by players not in the game, but it isn't working.

Player Group - Pick every player in (All players matching ((((Matching player) slot status) Equal to Has left the game) or (((Matching player) slot status) Equal to Is unused))) and do (Unit Group - Pick every unit in (Units in (Playable map area) matching (((Matching unit) is owned by (Picked player)) Equal to True)) and do (Unit - Remove (Picked unit) from the game))

Anyone know how to fix this, or another way to remove such units?
12-01-2003, 03:42 AM#2
UltimateJim
Player Group - Pick every player in (All players matching ((((Matching player) slot status) Equal to Has left the game) or (((Matching player) slot status) Equal to Is unused))) and do (Unit Group - Pick every unit in (Units in (Playable map area) matching (((Matching unit) is owned by (Picked player)) Equal to True)) and do (Unit - Remove (Picked unit) from the game))


the thinger outlined in red makes NO sense, it hosuld be

E = every 1 seconds

A = if player 1 red's slot status = is equal to not playing the do pick all unit owned by player 1 red and do unit remove picked unit

if player 2 blue's slot status = is equal to not playing the do pick all unit owned by player 2 blue and do unit remove picked unit

if player 3 teal's slot status = is equal to not playing the do pick all unit owned by player 3 teal and do unit remove picked unit






and so forth for however many players you have
12-01-2003, 04:21 AM#3
YellowSubmarine
Mmm, thanks :D
12-01-2003, 04:28 AM#4
Garu
Small point, but a 1 second periodic event is a bad idea. Rather, if you have UMSWE, try the event "Player- Advanced Event." With that you can detect when a player leaves instead of having an inefficient trigger that may cause lag. You may have to make a trigger for each player, but it's still better.