• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[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