Cheddar
This is the way it was meant to be.
- Reaction score
- 126
I created a system to spread leaving players' gold around to the remaining players... give them (Total gold of leaver) / (Remaining players) each.
The problem isn't with the gold, but the names. Of course, I want people to see who the stupid leaver was, but any attempts to display this player's name quickly switches to Red's name. Pink leaves, but it's recorded as Red. (I've had numerous Reds who say something like "wtf i didn't leave"). Also, when a player leaves, it should display the message once, but it goes nearly 8 or 9 times! It might be due to those actions being included in the player group, I should try that fix.
I have a sample trigger posted below. I was thinking of including a wait between setting the player's name (A solution I tried, to no avail) and displaying messages.
Before you start ratting me out for using individual actions for each player's message, it's done already... unless a player group will fix this.
If there's a solution that works, there's rep to be given.
EDIT: I'm a nimrod.
After looking over the display messages, apparently the trigger says to display Player 1's name.
The multiple message deal, however, is still there.
The problem isn't with the gold, but the names. Of course, I want people to see who the stupid leaver was, but any attempts to display this player's name quickly switches to Red's name. Pink leaves, but it's recorded as Red. (I've had numerous Reds who say something like "wtf i didn't leave"). Also, when a player leaves, it should display the message once, but it goes nearly 8 or 9 times! It might be due to those actions being included in the player group, I should try that fix.
I have a sample trigger posted below. I was thinking of including a wait between setting the player's name (A solution I tried, to no avail) and displaying messages.
Before you start ratting me out for using individual actions for each player's message, it's done already... unless a player group will fix this.
If there's a solution that works, there's rep to be given.
Code:
Player 2
Events
Player - Player 2 (Blue) leaves the game
Conditions
Actions
Player - Set name of Player 2 (Blue) to ((|cff2222ff + (Name of Player 2 (Blue))) + |r)
Game - Display to (All players) for 25.00 seconds the text: ((Name of Player 2 (Blue)) + |c0000cdf9 has left the game|r)
Player Group - Remove Player 2 (Blue) from Defenders
Unit Group - Pick every unit in (Units in (Playable map area) owned by Player 2 (Blue)) and do (Unit - Change ownership of (Picked unit) to (Random player from Defenders) and Change color)
Leaderboard - Change the label for Player 2 (Blue) in (Last created leaderboard) to <Leaver>
Player Group - Pick every player in (All players matching (((Matching player) Not equal to Player 12 (Brown)) and (((Matching player) slot status) Equal to Is playing))) and do (Actions)
Loop - Actions
Player Group - Add (Picked player) to RemainingPlayers
Set LeavingPlayerMoney = (Player 2 (Blue) Current gold)
Player - Add (LeavingPlayerMoney / (Number of players in RemainingPlayers)) to (Picked player) Current gold
Game - Display to Player Group - Player 1 (Red) the text: (You recieved + ((String((LeavingPlayerMoney / (Number of players in RemainingPlayers)))) + ( gold from + ((Name of Player 1 (Red)) + leaving.))))
Game - Display to Player Group - Player 3 (Teal) the text: (You recieved + ((String((LeavingPlayerMoney / (Number of players in RemainingPlayers)))) + ( gold from + ((Name of Player 1 (Red)) + leaving.))))
Game - Display to Player Group - Player 4 (Purple) the text: (You recieved + ((String((LeavingPlayerMoney / (Number of players in RemainingPlayers)))) + ( gold from + ((Name of Player 1 (Red)) + leaving.))))
Game - Display to Player Group - Player 5 (Yellow) the text: (You recieved + ((String((LeavingPlayerMoney / (Number of players in RemainingPlayers)))) + ( gold from + ((Name of Player 1 (Red)) + leaving.))))
Game - Display to Player Group - Player 6 (Orange) the text: (You recieved + ((String((LeavingPlayerMoney / (Number of players in RemainingPlayers)))) + ( gold from + ((Name of Player 1 (Red)) + leaving.))))
Game - Display to Player Group - Player 7 (Green) the text: (You recieved + ((String((LeavingPlayerMoney / (Number of players in RemainingPlayers)))) + ( gold from + ((Name of Player 1 (Red)) + leaving.))))
Game - Display to Player Group - Player 8 (Pink) the text: (You recieved + ((String((LeavingPlayerMoney / (Number of players in RemainingPlayers)))) + ( gold from + ((Name of Player 1 (Red)) + leaving.))))
Game - Display to Player Group - Player 9 (Gray) the text: (You recieved + ((String((LeavingPlayerMoney / (Number of players in RemainingPlayers)))) + ( gold from + ((Name of Player 1 (Red)) + leaving.))))
Trigger - Turn off (This trigger)
EDIT: I'm a nimrod.
After looking over the display messages, apparently the trigger says to display Player 1's name.
The multiple message deal, however, is still there.