After a player leaves, how do you make the neutral units convert to another player? I want it to be so that whenever a human (players 1-7) leaves, his units convert to the AI (player 8). Currently, this trigger automatically gives control of any human units to the AI regardless whether they are still playing or not (so when the game starts, they control no units). How can I fix this?
Trigger("Player 1","Player 2","Player 3","Player 4","Player 5","Player 6","Player 7","Player 8","Neutral players"){
Conditions:
Bring("Neutral players", "Any unit", "Anywhere", At least, 0);
Actions:
Give Units to Player("Neutral players", "Player 8", "Any unit", All, "Anywhere");
Preserve Trigger();
Comment("give quitter stuff to p8 **wont work");
}
Any help will be appreciated!
Win by luck, lose by skill.
Use Neutral, not Neutral players.
Neutral is what SCMDraft calls Player 12, and that is the player units are given to when they lose or leave.
TinyMap2 - Latest in map compression! ( 7/09/14 - New build! )
EUD Action Enabler - Lightweight EUD/EPD support! (ChaosLauncher/MPQDraft support!)
EUDDB -
topic - Help out by adding your EUDs! Or Submit reference files in the References tab!
MapSketch - New image->map generator!
EUDTrig -
topic - Quickly and easily convert offsets to EUDs! (extended players supported)
SC2 Map Texture Mask Importer/Exporter - Edit texture placement in an image editor!
This page has been viewed [img]http://farty1billion.dyndns.org/Clicky.php?img.gif[/img] times!

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch
*agrees with Farty*
Btw. it might be a good idea to give units 1 by 1 to the players (instead of all at once to a single player) so it'll be fairly distributed. Be aware however that for many units this might take some time, especially when you're not using hyper triggers.
It's possible to speed it up using more triggers but when you still want to distribute it fairly it gets more complicated. Just ask if you need elaboration.
I usually have it like this:
Trigger("All players"){
Conditions:
Always();
Actions:
Give Units to Player("Player 12", "Player 8", "Any unit", All, "Anywhere");
Preserve Trigger();
}
//-----------------------------------------------------------------//
None.
*agrees with Farty*
Btw. it might be a good idea to give units 1 by 1 to the players (instead of all at once to a single player) so it'll be fairly distributed. Be aware however that for many units this might take some time, especially when you're not using hyper triggers.
It's possible to speed it up using more triggers but when you still want to distribute it fairly it gets more complicated. Just ask if you need elaboration.
If you want to fairly distribute the units between the players, make this trigger
not shared, individual for each player who will receive the units.
Trigger("Player
#"){
Conditions:
Bring("Player 12", "Any unit", "
Your game board location", At least, 1);
Actions:
Give Units to Player("Player 12", "Current Player", "
Leavers unit that you want", 1, "
Your game board location");
Preserve Trigger();
}
//-----------------------------------------------------------------//
None.

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch
It makes no difference when you have triggers owned by a force / all players or when you tick all individual players belonging to that group.
StarCraft splits trigger groups up into the individual player anyway when the game starts.
Or in other words: P1-8 = All Players
Sorry if I didn't understand your last post, but this is what I understood: you say the trigger I posted needs to be only for All players/Force #?
If that is what you meant, then I say that won't work because it always executes only for Player 1 and having it separated from each player will make it give like this:
Give to p1 —> Give to p2 —> Give to p3 —> Give to p4 —> Give to p5 —> Give to p6 —> Give to p7 —> Give to p8 —> repeat...
If that is not what you meant, please let me know.
None.
Posting one trigger for All Players has the exact same effect as posting eight identical triggers for Players 1 - 8.
None.

SDE, BWAPI owner, hacker.
If you want to give each unit to a random player, then you need to use switch randomization, otherwise it doesn't matter who owns what trigger, the result will be the same(order given to players).

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch
If that is what you meant, then I say that won't work because it always executes only for Player 1 and having it separated from each player will make it give like this:
Give to p1 -> Give to p2 -> Give to p3 -> Give to p4 -> Give to p5 -> Give to p6 -> Give to p7 -> Give to p8 -> repeat...
It will work. All Players means that this trigger runs for All Players. Not just for player 1. It runs for P1 first and gives him 1 unit, then for P2 gives him another unit, then for P3, etc. until all units have been distributed.
As I said when the map starts StarCraft splits up triggers for Forces and All Players and creates a copy for each player belonging to that group.
So having the trigger owned by All Players is exactly the same as ticking Player 1-8 individually.
If that is what you meant, then I say that won't work because it always executes only for Player 1 and having it separated from each player will make it give like this:
Give to p1 -> Give to p2 -> Give to p3 -> Give to p4 -> Give to p5 -> Give to p6 -> Give to p7 -> Give to p8 -> repeat...
It will work. All Players means that this trigger runs for All Players. Not just for player 1. It runs for P1 first and gives him 1 unit, then for P2 gives him another unit, then for P3, etc. until all units have been distributed.
As I said when the map starts StarCraft splits up triggers for Forces and All Players and creates a copy for each player belonging to that group.
So having the trigger owned by All Players is exactly the same as ticking Player 1-8 individually.
Thanks, NudeRaider. I had a really big doubt about this, but now it's solved. Thank you
None.