• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[Trigger] How to remove units owned by a player that never started in the game

Status
Not open for further replies.

Systim

S

Systim

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.
 
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
 
Never remove units from game , that could cause some problems later . Add 1 second expiration timer to those units instead of removing
 
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.
 
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.
Back
Top