How to give units to teammates when a player left

KingOfBloodbath

New Member
Joined
Nov 20, 2006
Messages
1
Reaction score
0
I had a team micro sort of map, so bascially, 2 teams , 3 players in each team.

when the game begin, each team owns a Nexus (team1 owned by player1, team 2 owned by player 4). When the Nexus destroyed by oppsite team, the game ends.
Now, when player1 or player4 left the game, I want to give the nexus to their teammates, so the game could continue instead of ending. but if all 3 players of one team left the game, then I want the game end immediately.




I know it's involved p12 trigger. when player left, their units gives to p12, but how to give back the units to other player from p12. and what should be the Victory trigger looks like.

I hope I provide enough information about what I am trying to do, please any help will be appericate.
 

Kazhang

Member!
Joined
Apr 1, 2008
Messages
19
Reaction score
0
Location
Frozen Wastelands Of Ardun
Alrighty! ok..so ur right, they go to p12 (i suggest using scmdraft or p12 editor of SCXE) but when p12 gets the nexus, have it say...

--Example-- (being player 1 left to give to player 2)

Conditons--
COMMAND
Player 12 Commands atleast 1 nexus
Player 4 Commands atleast 1 nexus (confirms that player 1 has lost his nexus)Actions--
Give Units
Give all player 12 nexus to player 2 (so gives the player 1 nexus to player 2)
Preserve Trigger

And victory is easy
Kill
Force one (red team) kills one Force 2 (player 4-6) Nexus
End Scenario in victory for current player

PS: This example is based off of player 1, so like force 1 is checked off, but...that should work...and change around for 4...and just change if 2 leaves, give to three...AND if worst comes 2 worse...make player 7/8 comps...and give 7 a nexus and 8 a nexus, so u dont gotta worry about them leaving, just make 7 ally force 1, force 1 ally 7 and 8 ally force 2, force 2 ally 8...and u should be fine :D
 

SagaWrath

Smot Poker
Joined
Mar 15, 2008
Messages
16
Reaction score
0
You dont need special editors to make this happen. Though I suggest every map maker have one or blizzard makes a patch with one. I'm guessing the specifics are... Force 1, Players 1, 2, 3 Vs Force 2, Players 4, 5, 6 See if this setup works for you.

If player 1 leaves the game...
Players
Force 1
Conditions
Player 1 Command 0 buildings
Action
Give all Nexus to Current Player "They're 2 players as the current which I believe it will give to the last player on the Force list which is Player 3 since Player 1 left. (If you don't care who to give the Nexus to specifically on a team)

If this works... You'll need to make a trigger for each player.

You'll need to make a trigger for victory within Forces
Players
Force 1
Condition
Force 2 Command 0 Buildings
Action
Victory Force 1
(and Vice Versa) If you use fastest triggers this trigger might not ketch on when the player that owns the nexus leaves and switches from Player 12 to Player #. This is usually a common glitch. If so... the easiest way I can think of is putting locations over then nexus (weither it builds later, use triggers to move location on top of the nexus or premade location ontop of the nexus already on map) and having All Players Brings 0 Nexus to "Location"... Victory Force 1

The most common problem for people making these triggers comes from making the triggers within the player that leaves. Triggers don't work if they're under a player that doesn't exist in the game atm.
 
Top