• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece!🔗 Click here to enter!

PLAYER LEAVES GAME (2 Questions)

Status
Not open for further replies.
Level 30
Joined
Jul 31, 2010
Messages
5,246
ohglob.jpg

1) How to remove or hide this multiboard when a player leaves the game?

2) When a player leaves the game, how can I let all of his units and buildings be destroyed? or kill them to prevent them from being used by team players?
 
Last edited:
Level 12
Joined
Sep 11, 2011
Messages
1,176
View attachment 118502

1) How to remove or hide this multiboard when a player leaves the game?

2) When a player leaves the game, how can I let all of his units and buildings be destroyed? or kill them to prevent them from being used by team players?

saves the multiboard that you create to a multiboard variable.

  • Multiboard - Create a multiboard with 1 columns and 1 rows, titled Bla Bla Bla
  • Set Your Multiboard Variable = (Last Created Multiboard)

then do this :

  • Leaver
    • 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
      • Multiboard - Destroy (Your Multiboard Variable)
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units owned by (Triggering Player)) and do (Actions)
        • Loop - Actions
          • Unit - Kill (Picked unit)
Note :
- Leaver is a Unit Group variable.
- Custom script: call DestroyGroup (udg_Leaver) is a custom script to destroy group(which is causing leaks),
 
Last edited:
Status
Not open for further replies.
Top