sc2c.org

Go Back   Sc2C.org > Developer's Corner > Scripting
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
Old 01-29-2011, 04:25 AM   #1
1bitpaw
Junior Member
 
Join Date: Jan 2011
Posts: 2
Default Removing a player's unit when they leave the game

Hello, fairly new to mapmaking here.

Which event would I use for when a player has no units?

In WC3 editor, you could have done (Player's food becomes 0) or something along those lines.

^Solved above problem by using (Any Unit Dies).



New Question.:

How do I remove all of a players' units when they leave the game?


Thanks in advance.

Last edited by 1bitpaw : 01-29-2011 at 07:19 AM.
1bitpaw is offline   Reply With Quote
Old 01-29-2011, 11:44 AM   #2
2-P
chasing vapor trails
 
2-P's Avatar
 
Join Date: May 2010
Posts: 51
Default

Use the event "player leaves game", then pick every unit on the map and remove it if it belongs to the triggering player.

Code:
Events Player - Player Any Player leaves the game with Any Local Variables Conditions Actions Unit Group - Pick each unit in (Any units in (Entire map) owned by player (Triggering player) matching Excluded: Missile, with at most Any Amount) and do (Actions) Actions Unit - Remove (Picked unit) from the game
2-P is offline   Reply With Quote
Old 01-30-2011, 12:25 AM   #3
1bitpaw
Junior Member
 
Join Date: Jan 2011
Posts: 2
Default

Thanks, worked perfectly!
1bitpaw is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 10:20 AM.


Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.