HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Help: Removing Players Units & Buildings After They Leave The Game/Are Dropped

10-11-2002, 08:26 PM#1
Guest
What would the trigger be to SUCCESSFULLY remove all of a players buildings and units after they are dropped from a game or have been defeated. I've messed around with this forever and although the trigger looks sound it doesnt work. I can remove players at map initilization successfully but not after they have been defated/dropped. This is what my trigger looks like right now.

Event
- Every 10.00 seconds of the game
Conditions
Action
- If ((Player 1 (Red) slot status) Equal to Has Left The Game) then do (Unit Group - Pick every unit in (Units Owned By Triggering Player)) and do (Unit - Remove (Picked Unit) from the game)
10-11-2002, 08:30 PM#2
ph33rb0
The problem comes in when you do (Unit Group - Pick every unit in (Units Owned By Triggering Player)) because the event doesnt call upon a player to trigger it, and therefore your triggering player value is null.
10-11-2002, 10:58 PM#3
Dinadan87
You must make a condition! The trigger will not recognize "Triggering Player" unless a player or some sort is used in an event or condition. Rather than using the "If ((Player 1 (Red) slot status) Equal to Has Left The Game) then do (Unit Group - Pick every unit in (Units Owned By Triggering Player)) and do (Unit - Remove (Picked Unit) from the game)" as an action... take this first part "(Player 1 (Red) slot status) Equal to Has Left The Game" and make that a condition. Then take the second part "Unit Group - Pick every unit in (Units Owned By Triggering Player)" and "Unit - Remove (Picked Unit) from the game" as actions. Actually it may not work this way either. I'm not sure if that condition designates a triggering player or not... :bgrun: Oh well I think there's a different event and condition you could use but I don't know what! My way is worth a try though I guess
10-11-2002, 11:04 PM#4
ChronOmega
duh just do

Event
- Every 10.00 seconds of the game
Conditions
Action
- If ((Player 1 (Red) slot status) Equal to Has Left The Game) then do (Unit Group - Pick every unit in (Units Owned By Player 1 (red))) and do (Unit - Remove (Picked Unit) from the game)

its so simple
10-12-2002, 10:43 AM#5
Gozai
Quote:
Originally posted by Mythmon
duh just do

Event
- Every 10.00 seconds of the game
Conditions
Action
- If ((Player 1 (Red) slot status) Equal to Has Left The Game) then do (Unit Group - Pick every unit in (Units Owned By Player 1 (red))) and do (Unit - Remove (Picked Unit) from the game)

its so simple


I understand, that he needs this function to be applicable to every player, so he had to complete it with:

Action - For each Integer A from 1 to <insert number of maximum players> do (If((Player (Integer A)) slot status is Unequal to Is playing then do Pick every unit in (Units owned by Player (Integer A)) and do (Unit - Remove (Picked Unit) from game), else (Do nothing)

In case, that you only need to remove Units of quitting players, change "...slot status is Unequal to Is playing..." to "...slot status is Equal to Has left the game..."