HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

spliting units when some1 leaves

12-01-2002, 03:16 PM#1
danewb
all I really need to know is how to split _all_ units from the player that left between the rest of the allies, currently I only got it to do 1 unit :/
12-02-2002, 05:04 AM#2
dataangel
Event
Player leaves blah blah blah
Action
Unit group all units owned by leaving player and change owner of picked unit to random player
12-02-2002, 06:55 PM#3
Guest
I don`t know the event, but I know the actions:

Player - Make {Triggering Player} treat {the players to share with} as an ally with shared vision and full shared unit control.
12-02-2002, 07:12 PM#4
DKSlayer
I get from this he means he wants to split the left over units amongst the remaining players. So that joe gets 1 peon and parry gets 1 peon. I may be wrong.
But if I am right, this would be tricky. I am busy at the sec but I would think this would envolve major code. I'll post later when I think of a way to pull this off.
12-02-2002, 07:36 PM#5
Guest
How about adding all of the leaving players units to a unit group, then giving a random unit from that unit group to a player? And just copy\paste that so everyone gets units. Although the problem here would be not knowing how many units the players has. Thus giving away too little or too much. Just throwing my thoughts into the group.
12-02-2002, 08:20 PM#6
Milkman
If it is what i think it is It's really simple.
Just do this:
Event: Every X seconds
Action:
--Pick every player matching condition player slot status equal to has left the gama and do: unit group pick every unit owned by picked player and give unit to random player from all players and retain color

--Pick every player matching condition player slot status equal to has left the gama and do: add picked player current gold random player from all players

This trigger was taken from my map Tower Warz