Teammate Leaving Help

Status
Not open for further replies.
  • Events
    • Player - Player 1 (Red) leaves the game
    • Conditions
    • Actions
      • Player Group - Pick every player in (All allies of (Triggering player)) and do (Actions)
        • Loop - Actions
          • Player - Make (Triggering player) treat (Picked player) as an Ally with shared vision and full shared units
Note: This leaks a force.
 
Events
Player - Player 2 (Blue) leaves the game
Conditions
Actions
Player Group - Pick every player in (All players matching (((Matching player) Not equal to Player 1 (Red)) and ((((Matching player) is an ally of Player 1 (Red)) Equal to True) and (((Matching player) slot status) Equal to Is playing)))) and do (Actions)
Loop - Actions
Player - Add ((Player 2 (Blue) Current gold) / (Number of players in (All players matching (((Matching player) Not equal to Player 1 (Red)) and ((((Matching player) is an ally of Player 1 (Red)) Equal to True) and (((Matching player) slot status) Equal to Is playing)))))) to (Picked player) Current gold


This trigger is from my map. Player 1 to 7 are allies so if a player leaves, for example, Blue (player 2), his gold is split equally among the remaining players that are still in game. In this trigger, Red (player 1) doesnt get any gold because he is a computer player.
 
Status
Not open for further replies.
Back
Top