• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Need another help about player left system

Status
Not open for further replies.
Level 11
Joined
Aug 1, 2009
Messages
714
Help! Help! Help!
I need help about the player left system. it is about when a player left all of his gold and units are share to his allies. I got everything done except the share of units.
I use this code
  • Game - Grant shared vision and full shared unit control of (Triggering player) units with his/her allies
But it destroys my multiboard.
I need some replacement for this code without destroying my multiboard.
Help me pls.
 
Try this:
  • Player Group - Pick every player in (All allies of (Triggering player)) and do (Actions)
    • Loop - Actions
      • Player - For (Picked player), turn Shared vision On toward (Triggering player)
      • Player - For (Picked player), turn Full shared units On toward (Triggering player)
I am not sure if you need to destroy that player group, that is why I didn't set it in a variable. Well, it won't be a reason of lag anyway, so no worries.
 
Level 11
Joined
Aug 1, 2009
Messages
714
Thanks for the help pharaoh
But I got it.
  • Player Left
    • Events
      • Player - Player 1 (Red) leaves the game
      • Player - Player 2 (Blue) leaves the game
      • Player - Player 3 (Teal) leaves the game
      • Player - Player 4 (Purple) leaves the game
      • Player - Player 5 (Yellow) leaves the game
      • Player - Player 6 (Orange) leaves the game
      • Player - Player 7 (Green) leaves the game
      • Player - Player 8 (Pink) leaves the game
      • Player - Player 9 (Gray) leaves the game
      • Player - Player 10 (Light Blue) leaves the game
      • Player - Player 11 (Dark Green) leaves the game
      • Player - Player 12 (Brown) leaves the game
    • Conditions
    • Actions
      • Game - Display to (All players) for 12.50 seconds the text: ((String_Player_Color[(Player number of (Triggering player))] + String_Player_ChangeName[(Player number of (Triggering player))]) + |r has left the game! |c00ff0000W|r|c00ed1200h|r|c00db2400a|r|c00c93600t|r|c00b74800 |r|c00a55a00a|r|c00936c00 |r|c00817e00Q|r|
      • Multiboard - Set the text for Multiboard item in column 1, row Multi_Number[(Player number of (Triggering player))] to (|c00000000 + (String_Player_RealName[(Player number of (Triggering player))] + |r))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering player) is in Team_1) Equal to True
        • Then - Actions
          • Player Group - Pick every player in Team_1 and do (Actions)
            • Loop - Actions
              • Player - For (Triggering player), turn Shared units On toward (Picked player)
              • Player - Add (((Triggering player) Current gold) / (Number of players in Team_1)) 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 Team_2) Equal to True
        • Then - Actions
          • Player Group - Pick every player in Team_2 and do (Actions)
            • Loop - Actions
              • Player - For (Triggering player), turn Shared units On toward (Picked player)
              • Player - Add (((Triggering player) Current gold) / (Number of players in Team_2)) to (Picked player) Current gold
              • Player - Set (Triggering player) Current gold to 0
        • Else - Actions
 
Status
Not open for further replies.
Top