• 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.

Distributing Gold between all allied players, how?

Status
Not open for further replies.
Level 10
Joined
Jun 7, 2008
Messages
420
Basically I need to distribute gold over all players that are still around.
So the trigger will be
Event: Player 6 gold greater than or equal to 5000
Condition: None
Action: ??? PLEASE HELP

I obviously don't want gold given to leavers or slots left blank, so yeah please help thanks.

Also, please remember to list the trigger type (unit, player, etc) and other details particularly categories and subcategories as this being my first time so deep into the editor, I haven't got a clue. Didn't understand half the threads here that would have helped...

thanks a ton
 
Level 9
Joined
Apr 3, 2008
Messages
700
Trigger №1

  • Events
    • Map initialization
  • Conditions
  • Actions
    • For each (Integer A) from 1 to 12, do (Trigger - Add to trig2 <gen> the event (Player - (Player(i)) leaves the game))
Trigger №2

  • Events
  • Conditions
  • Actions
    • Player Group - Remove (Triggering player) from Players
    • Player Group - Pick every player in Players and do (Actions)
      • Loop - Actions
        • Player - Add (((Triggering player) Current gold) / (Number of players in Players)) to (Picked player) Current gold
    • Player - Set (Triggering player) Current gold to 0
Note: global variable of force type "player" contains players who are still ingame.
 
Level 4
Joined
Aug 1, 2007
Messages
66
The group "PlayersKingPlaying" represents the players on the team that are still playing, like the other guys did, but this one splits an amount of gold among the players.

  • Untitled Trigger 001
    • Events
    • Conditions
    • Actions
      • Set TempInteger = (5000 / (Number of players in PlayersKingPlaying))
      • Player Group - Pick every player in PlayersKingPlaying and do (Actions)
        • Loop - Actions
          • Player - Add TempInteger to (Picked player) Current gold
 
Level 10
Joined
Jun 7, 2008
Messages
420
How do we create player group? Last time I tried a few wierd things came out. No such thing as create custom player group.
The add variable doesn't allow that either. At least I couldn't find a way to progress from the add variable part. I think its under variables right? Looks awfully familiar but can't progress.
 
Status
Not open for further replies.
Top