• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

Money sharing

Status
Not open for further replies.
Level 1
Joined
Feb 7, 2008
Messages
4
I am making custom hero battle map and what i am asking is this:

Could anyone make a trigger that would share the money of leaving player for the rest of his team even if the team starts to use the leaving hero?
 
  • Events
    • Player - Player 1 (Red) leaves the game
    • Player - Player 2 (Blue) leaves the game
    • ...
  • Conditions
  • Actions
    • Set Gold = ((Triggering Player)'s Current Gold)
    • Set Temp_G = (Players matching ((Matching Player controller Equal to User)) and (Matching Player slot status Equal to Is Playing) and (Matching Player not Equal to (Triggering Player) and (Matching Player belongs to an ally of (Triggering Player) Equal to True))
    • Player Group - Pick up every Player in (Temp_G) and do (Actions)
      • Loop - Actions
        • Player - Add ((Gold)/(Number of Players in (Temp_G)) to (Picked Player)
    • Custom script: call DestroyForce (udg_Temp_G) -> If you don't use it again
Yes, Child_0f_Bodom, i realized that and edited the post, thank you :)
 
Level 16
Joined
Jul 21, 2008
Messages
1,121
I hope this helps:

  • GoldShare
    • Events
      • Player - Player 1 (Red) leaves the game
      • Player - Player 2 (Blue) leaves the game
      • Player - Player 3 (Teal) leaves the game
    • Conditions
    • Actions
      • -------- Put any number of players in trigger event --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering player) is in Team1) Equal to True
        • Then - Actions
          • Player Group - Remove (Triggering player) from Team1
          • Player Group - Pick every player in Team1 and do (Actions)
            • Loop - Actions
              • Player - Add (((Triggering player) Current gold) / (Number of players in Team1)) to (Picked player) Current gold
          • Player - Set (Triggering player) Current gold to 0
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering player) is in Team2) Equal to True
        • Then - Actions
          • Player Group - Remove (Triggering player) from Team2
          • Player Group - Pick every player in Team2 and do (Actions)
            • Loop - Actions
              • Player - Add (((Triggering player) Current gold) / (Number of players in Team2)) to (Picked player) Current gold
          • Player - Set (Triggering player) Current gold to 0
        • Else - Actions

@ Pharaoh_: Your trigger will give gold to all players, not just the leavers team.
 
Status
Not open for further replies.
Top