• 🏆 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!

[Trigger] A player leaves the game

Status
Not open for further replies.
Level 3
Joined
Oct 8, 2011
Messages
27
I can't make this TRIGGER to work.
When a player leaves it should destroy his buildings and unites.

  • Player 1 Red Leaves
    • Events
      • Player - Player 1 (Red) leaves the game
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units owned by Player 1 (Red)) and do (Unit - Kill (Triggering unit))
      • Game - Display to (All players) for 5.00 seconds the text: Player Red had left...
What is wrong ?
 
Level 12
Joined
Oct 16, 2010
Messages
680
it should be

  • Unit Group - Pick every unit in (Units owned by Player 1 (Red)) and do (Unit - Kill (Picked unit))
triggering unit is a response to a unit event

for unit picks - use Picked unit

EDIT: and you should also use this before Unit Group - ...blabla

  • Custom script: set bj_wantDestroyGroup = true
 
Last edited:
Level 17
Joined
Feb 11, 2011
Messages
1,860
What Lender said.

Your complete trigger would look like this:

  • Trigger
    • 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
    • Conditions
    • Actions
      • 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)
      • Game - Display to (All players) the text: ((Name of (Triggering player)) + has left the game.)
Notice how I have made this run if Player 1 - 4 leaves. You can add more players in the event section. The text will display the name of the leaving player.
 
Status
Not open for further replies.
Top