• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Split leaver gold equally

Status
Not open for further replies.
Level 45
Joined
Feb 27, 2007
Messages
5,578
  • There is a "<Player> leaves the game" event you could use instead of this. I presume you have a trigger like this for every player? They could all be combined into one using an event like that for each slot that could have a user player.

  • You could compute leaverGold = (<Player> current gold) / (Number of players in Player_User) to save yourself having to recompute it each time.

  • The 'gold received' message doesn't need to be inside a Player Group - Pick action.

  • If it truly is displaying the right number of gold but not adding it, I do not see the reason for this. Looks like it should work to me. I would delete the whole line and create it again.
 
Level 9
Joined
Sep 20, 2015
Messages
385
As Pyrogasm said, you can add multiple player in the event and then use TriggerPlayer to do the actions you need.

Event
Player 1 leave the game
Player 2 leave the game
ecc

Actions
...
Display Text to All players : (Name of (Trigger Player) has left the game)
Pick every unit in Map Area Owned by Trigger Player
 
Status
Not open for further replies.
Top