• 🏆 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] How to remove units owned by a player that never started in the game

Status
Not open for further replies.
Level 1
Joined
Aug 14, 2008
Messages
4
I hit a road block when I was trying to remove units owned by a player when there was no player in the first place. Like if I started a match without a full house, how can I remove the units owned by that color/player? I've already tried:
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
None

Actions
Unit Group - Pick every unit in (Units owned by (Triggering player)) and do (Actions)
Loop - Actions
Unit - Kill (Picked unit)

which works fine with players that leave after starting the game but doesn't do anything for what I'm trying to do.

thanks for any help.
 
Level 17
Joined
Aug 20, 2007
Messages
1,122
Yep, non-existent players don't leave the game... They just don't play...

Just follow what Just Spec said...

  • Event
  • Time - Elapsed game time is about .5 seconds.
  • Condition
  • dont need one
  • Action
  • Player Group - Pick players in (All Players)
  • If Then Else
  • ~ If Picked Player Slot Status = Not Playing
  • ~ Then Remove All units owned by Picked Player
  • ~ Else
 
Level 6
Joined
Jul 30, 2008
Messages
187
Never remove units from game , that could cause some problems later . Add 1 second expiration timer to those units instead of removing
 
Level 1
Joined
Aug 14, 2008
Messages
4
I think I'm doing it wrong, now I have:

Events:
Time - Elapsed game time is 0.50 seconds

Conditions:
None

Actions
Player Group - Pick every player in (All players) and do (Action)
-Loop Actions
If (((Picked player) slot status) Equal to is unused) then do (Unit Group - Pick every unit in (Units owned by (Picked player)) and do (Unit - Remove (Picked unit) from the game)) else do (Do nothing)

Did I over kill it or something? lol, thanks for the help again. :hohum:

P.S. I'm new to map making for WC3.
 
Level 1
Joined
Aug 14, 2008
Messages
4
Nevermind that trigger ^^ removes ALL units from the map... I'm not sure why it seams to be ignoring the condition... problem is still UNSOLVED. :sad:
 
Status
Not open for further replies.
Top