Leaving Players' Names?

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.


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.
 
err, ofcourse it says reds name as thats what you have put in the trigger, read the last 10 lines, instead change that to triggering player.

Try this, its much more simplified:

Code:
LeaversGold
    Events
        Player - (Player((Max(1, 8)))) leaves the game
    Conditions
    Actions
        Set LeavingPlayerMoney = (Triggering Player) Current gold)
        Player Group - Remove (Triggering Player) from Defenders
        Leaderboard - Change the label for (Player) in (Last created leaderboard) to <Leaver>
        Unit Group - Pick every unit in (Units in (Playable map area) owned by (Triggering Player) and do (Unit - Change ownership of (Picked unit) to (Random player from Defenders) and Change color)
        Leaderboard - Change the label for (Triggering Player) in (Last created leaderboard) to <Leaver>
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                Game - Display to (All players) for 30.00 seconds the text: ((Name of (Triggering player)) + has left the game.)
                Player - Add (LeavingPlayerMoney / (Number of players in RemainingPlayers)) to (Picked player) Current gold
                Game - Display to (Picked Player) the text: (You recieved  + ((String((LeavingPlayerMoney / (Number of players in RemainingPlayers)))) + ( gold from  + ((Name of (Triggering player)) +  leaving.))))
 
err, ofcourse it says reds name as thats what you have put in the trigger, read the last 10 lines, instead change that to triggering player.

Try this, its much more simplified:

Code:
LeaversGold
    Events
        Player - (Player((Max(1, 8)))) leaves the game
    Conditions
    Actions
        Set LeavingPlayerMoney = (Triggering Player) Current gold)
        Player Group - Remove (Triggering Player) from Defenders
        Leaderboard - Change the label for (Player) in (Last created leaderboard) to <Leaver>
        Unit Group - Pick every unit in (Units in (Playable map area) owned by (Triggering Player) and do (Unit - Change ownership of (Picked unit) to (Random player from Defenders) and Change color)
        Leaderboard - Change the label for (Triggering Player) in (Last created leaderboard) to <Leaver>
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                Game - Display to (All players) for 30.00 seconds the text: ((Name of (Triggering player)) + has left the game.)
                Player - Add (LeavingPlayerMoney / (Number of players in RemainingPlayers)) to (Picked player) Current gold
                Game - Display to (Picked Player) the text: (You recieved  + ((String((LeavingPlayerMoney / (Number of players in RemainingPlayers)))) + ( gold from  + ((Name of (Triggering player)) +  leaving.))))

what kind of variable is Player in this line? Player - (Player((Max(1, 8)))) leaves the game also what is LeavingPlayerMoney
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top