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

[General] Leaver problem

Status
Not open for further replies.
Level 4
Joined
Jul 15, 2012
Messages
89
im making a hero arena map and there is a problem , i have made so many triggers to remove leaver's hero when the player leaves the game but it still remains and i dont know what to do . please help me its about a month im struggling .:goblin_cry:
 
Level 18
Joined
May 11, 2012
Messages
2,103
  • Kick Player (which left)
    • Events
      • Player - Player 1 (Red) types a chat message containing -kick (leaving player) as An exact match
    • Conditions
      • (Entered chat string) Equal to -kick (leaving player)
    • Actions
      • Game - Defeat Player (leaving player) with the message: You were kicked by ...
      • Game - Display to (All players) the text: Player (leaving player) was kicked by player red
      • Unit Group - Pick every unit in (Units owned by (leaving player)) and do (Unit - Remove (Picked unit) from the game)
      • Trigger - Turn off (This trigger)
Or if u want i can make the trigger for you
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Why did you turn off the trigger lulz ?
If the map consists of more than 2 players, you're fked up :)

Also, it should be detected by this;
  • Setup
    • Events
      • Map initialization
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Trigger - Add to Leaves <gen> the event (Player - (Player((Integer A))) leaves the game)
  • Leaves
    • Events
    • Conditions
    • Actions
      • Game - Display to (All players) the text: (Player + ((String((Player number of (Triggering player)))) + has left the game.))
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units owned by (Triggering player)) and do (Actions)
        • Loop - Actions
          • Unit - Remove (Picked unit) from the game
When a Player leaves a game, it will display a message showing that player has left the game and all units owned by that player will be removed from the game (Heroes cannot be resurrected in this way).
 
Level 4
Joined
Jul 15, 2012
Messages
89
Thank you guys but why my own triggers dont work?
79490894329982394224.jpg
 
Last edited:
Level 18
Joined
May 11, 2012
Messages
2,103
plz paste trigger properly so I can see what you did

just do this trigger for every player in your map and type message ingame when someone leaves to kick them
or you can do trigger like defskull if u want

  • Kick Player Blue
    • Events
      • Player - Player 1 (Red) types a chat message containing -kick blue as An exact match
    • Conditions
      • (Entered chat string) Equal to -kick blue
    • Actions
      • Game - Defeat Player 2 (Blue) with the message: You were kicked by ...
      • Game - Display to (All players) the text: Player Blue was kic...
      • Unit Group - Pick every unit in (Units owned by Player 2 (Blue)) and do (Unit - Remove (Picked unit) from the game)
      • Trigger - Turn off (This trigger)
 
Level 4
Joined
Jul 15, 2012
Messages
89
please help me. i dont understand why theese triggers dont work. as i am noobish i couldnt make a trigger like defskull said in WE plz if it is possible post that trigger converted to Custom text so i can simply copy and paste (for 6 players) thanks a lot.
-First one:
  • Leaver1
    • 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
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units owned by (Triggering player)) and do (Actions)
        • Loop - Actions
          • Unit - Remove (Picked unit) from the game
      • Game - Display to (All players) for 5.00 seconds the text: ((Name of (Triggering player)) + |c00FF0000has left the game)
---------------------------------------------------------------------------------------------------------------
-Second one: (for each player)
  • LeaverP1
    • Events
      • Player - Player 1 (Red) leaves the game
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units owned by Player 1 (Red)) and do (Actions)
        • Loop - Actions
          • Unit - Remove (Picked unit) from the game
      • Game - Display to (All players) for 5.00 seconds the text: ((Name of Player 1 (Red)) + |c00FF0000has left the game)
-------------------------------------------------------------------------------------------------------------
-Third one:
  • left
    • Events
      • Time - Every 3.00 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 1 (Red) slot status) Not equal to Is playing
        • Then - Actions
          • Unit Group - Pick every unit in (Units owned by Player 1 (Red)) and do (Unit - Remove (Picked unit) from the game)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 2 (Blue) slot status) Not equal to Is playing
        • Then - Actions
          • Unit Group - Pick every unit in (Units owned by Player 2 (Blue)) and do (Unit - Remove (Picked unit) from the game)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 3 (Teal) slot status) Not equal to Is playing
        • Then - Actions
          • Unit Group - Pick every unit in (Units owned by Player 3 (Teal)) and do (Unit - Remove (Picked unit) from the game)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 4 (Purple) slot status) Not equal to Is playing
        • Then - Actions
          • Unit Group - Pick every unit in (Units owned by Player 4 (Purple)) and do (Unit - Remove (Picked unit) from the game)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 5 (Yellow) slot status) Not equal to Is playing
        • Then - Actions
          • Unit Group - Pick every unit in (Units owned by Player 5 (Yellow)) and do (Unit - Remove (Picked unit) from the game)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 6 (Orange) slot status) Not equal to Is playing
        • Then - Actions
          • Unit Group - Pick every unit in (Units owned by Player 6 (Orange)) and do (Unit - Remove (Picked unit) from the game)
        • Else - Actions
 
Last edited:
Level 4
Joined
Jul 15, 2012
Messages
89
i've already made a trigger like the one the_blood suggested but its not good enough i need something to do this automaticaly (dear the_blood i mean no offence to you and i realy appreciate your help)
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
1st and 2nd trigger is nonsense ?
They are doing the same thing (For Player 1).
I think you do not need the 2nd trigger I guess because the 1st trigger has already handle it for Player 1.

And as for the 3rd trigger, each condition must in the branch of 'Else' function.
You should do an Independent Event but what you did was Dependent Event.
You should know this if you learn Math.
 
Level 4
Joined
Jul 15, 2012
Messages
89
i've enabled them all at once but when a player leaves they are not triggered (the third trigger only removes players with closed/open slot)
1st and 2nd trigger is nonsense ?
And as for the 3rd trigger, each condition must in the branch of 'Else' function.
You should do an Independent Event but what you did was Dependent Event.
You should know this if you learn Math.

else actions are empty in third trigger :ogre_icwydt:
 
Status
Not open for further replies.
Top