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.