Hello,
Ive tried different triggers to accomplish this but I just cant make it work properly.
How it should work:
1) When ally leaves game, his current gold shall be devided equally among his allys
2) No double reward: Leaving player must not keep his gold after he leaves, cause allys can control and build units for the leaving players.
I hope any of you can create it for me, or maybe already has such a trigger ready to go. Thanks alot !
The following trigger I tried out last but it doesnt work (see Point 1 and 2 above):
Ive tried different triggers to accomplish this but I just cant make it work properly.
How it should work:
1) When ally leaves game, his current gold shall be devided equally among his allys
2) No double reward: Leaving player must not keep his gold after he leaves, cause allys can control and build units for the leaving players.
I hope any of you can create it for me, or maybe already has such a trigger ready to go. Thanks alot !
The following trigger I tried out last but it doesnt work (see Point 1 and 2 above):
Your 2nd request is a little confusing, but I think this is how I would do the first one... I literally wrote it out in this little box, so I'm not sure if it will work
- Map Init
- Events
- Map initialization
- Conditions
- Actions
- Set playerColor[1] = |c00FF0303
- Set playerColor[2] = |c000042FF
- Set playerColor[3] = |c001CE6B9
- Set playerColor[4] = |c00540081
- Set playerColor[5] = |c00FFFC01
- Set playerColor[6] = |c00FEBA0E
- Player Group - Pick every player in (All players) and do (Actions)
- Loop - Actions
- Set tempPlayer = (Picked player)
- Set tempInt = (Player number of leavingPlayer)
- Set playerName[tempInt] = (Name of tempPlayer)
- Player Leave
- Events
- Player - Player 1 (Red) leaves the game
- Player - Player 2 (Blue) 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
- Conditions
- Actions
- Set leavingPlayer = (Triggering player)
- Set tempInt = (Player number of leavingPlayer)
- Game - Display to (All players) the text: (playerName[tempInt] + has left the game!)
- Player Group - Pick every player in (All players) and do (Actions)
- Loop - Actions
- Set tempPlayer = (Picked player)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (tempPlayer is an ally of leavingPlayer) Equal to True
- (tempPlayer slot status) Equal to Is playing
- Then - Actions
- Player Group - Add tempPlayer to tempPlayerGroup
- Set numberOfAlly = (numberOfAlly + 1)
- Else - Actions
- Set tempInt = ((leavingPlayer Current gold) / numberOfAlly)
- Player Group - Pick every player in tempPlayerGroup and do (Actions)
- Loop - Actions
- Set tempPlayer = (Picked player)
- Player - Add tempInt to tempPlayer Current gold
- Player Group - Remove tempPlayer from tempPlayerGroup
- Set numberOfAlly = (numberOfAlly - 1)