• 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] Splitting money when player leaves

Status
Not open for further replies.
Level 13
Joined
Oct 27, 2008
Messages
1,176
  • red quits
    • Events
      • Player - Player 1 (Red) leaves the game
    • Conditions
    • Actions
      • Player - Add (4 / (Player 1 (Red) Current gold)) to Player 2 (Blue) Current gold
      • Player - Add (4 / (Player 1 (Red) Current gold)) to Player 3 (Teal) Current gold
      • Player - Add (4 / (Player 1 (Red) Current gold)) to Player 4 (Purple) Current gold
      • Player - Add (4 / (Player 1 (Red) Current gold)) to Player 5 (Yellow) Current gold
Would that work yes or no?
 
Level 28
Joined
Mar 25, 2008
Messages
2,955
  • Actions
    • Custom script: set bj_wantDestroyGroup = true
    • Unit Group - Pick every unit in (Units in (Playable map area) owned by (Triggering player)) and do (Actions)
      • Loop - Actions
        • Player - Add (Point-value of (Picked unit)) to (Triggering player) Current gold
        • Unit - Kill (Picked unit)
    • Player Group - Pick every player in (All players matching ((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Plays))) and do (Actions)
      • Loop - Actions
        • Player - Add (((Triggering player) Current Gold) / ((Number of players in (All players matching ((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Plays))) - 0)) to (Picked player) Current Gold
    • Set QuittersGold = ((Triggering player) Current Gold)
    • Leaderboard - Remove (Triggering player) from (Last created leaderboard)
    • Player Group - Remove (Triggering player) from Defenders
    • Game - Display to (All players) the text: ((Name of (Triggering player)) + has left the game)
    • Game - Display to (All players) the text: ((All players receive + ((String((QuittersGold / (Number of players in (All players matching ((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Plays))))))) + gold)) + from the leaving player)
    • Player - Set (Triggering player) Current gold to 0
 
Status
Not open for further replies.
Top