Maybe i didn't make my question clear...
There are two forces A and B
If any one from A leaves, his units go to P12.
(Problem! I can't predict who will leave the game.)
Therefore, if one player from A leaves and his unit may applies to B.
But i want whoever's unit gives to his ally upon quiting.
Thanks...

[right][snapback]125932[/snapback][/right]
You can units at the beginning of the game to see who is in the game. Just give each player a unit that doesnt die and is there the whole game and doesnt move, such as a powerup. Then at the beginning have a trigger that detects if the player cmds the unit. Then if the player leaves, that unit will naturally be given to p12, though it will remain in the place the player that left was, which then you can detect with triggers.
So first, player 1 will cmd a powerup. A location will be there too. Then once player one leaves, p12 will have the unit at the location. Then you know that player 1 has left. This works because if the player isnt there are the start, then the unit isnt even created for the player.