What I want to do is when a player leaves all the resourses he has , and he has spent to be gives to his allies. The problem is .. how is it possible to make a trigger that checks how much resourses has the player spent and then to give it to his allies.
EDIT: I think I did it, but I'm not sure ... Here Is the trigger
EDIT: I think I did it, but I'm not sure ... Here Is the trigger
-
Player Leave trigger
-

Events
-


Player - Player 1 (Red) leaves the game
-


Player - Player 2 (Blue) leaves the game
-


Player - Player 3 (Teal) leaves the game
-


Player - Player 3 (Teal) leaves the game
-


Player - Player 4 (Purple) leaves the game
-


Player - Player 5 (Yellow) leaves the game
-


Player - Player 6 (Orange) leaves the game
-


Player - Player 7 (Green) leaves the game
-


Player - Player 8 (Pink) leaves the game
-


Player - Player 9 (Gray) leaves the game
-


Player - Player 10 (Light Blue) leaves the game
-


Player - Player 11 (Dark Green) leaves the game
-


Player - Player 12 (Brown) leaves the game
-
-

Conditions
-

Actions
-


Set Team[1] = (All allies of Player 1 (Red))
-


Set Team[2] = (All allies of Player 4 (Purple))
-


Set Team[3] = (All allies of Player 7 (Green))
-


Set Team[4] = (All allies of Player 10 (Light Blue))
-


Set PlayerVar = (Triggering player)
-


Unit Group - Pick every unit in (Units owned by PlayerVar) and do (Actions)
-



Loop - Actions
-




Unit - Explode (Picked unit)
-
-
-


Player Group - Pick every player in (All allies of PlayerVar) and do (Actions)
-



Loop - Actions
-




Player - Add ((PlayerVar Total gold gathered) / (Number of players in Team[(Team number of (Triggering player))])) to (Picked player) Current gold
-
-
-
-
Last edited:

