Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Give all units owned by a player that quit
Give all units owned by a player that quit
This topic is locked. You can no longer write replies here.
Aug 6 2009, 5:12 pm
By: Trevo4311  

Aug 6 2009, 5:12 pm Trevo4311 Post #1



Ok so i'm trying to make it when someone leaves the game, it equally gives all the units owned by that player to the players still in the game.

I tried using this trigger:

Condition:
Neutral commands atleast 1 [any unt]

Action:
Kill all flag owned by neutral
Kill all probe owned by neutral
Give all [any unit] to force 1
Preserve trigger

Can i not use force 1 as a player to recieve units or am i doing something wrong?



None.

Aug 6 2009, 8:58 pm Vrael Post #2



What is probably happening, is that you gave the trigger to a wrong player. Only players 1-8 can run triggers, so if you checked another player for the trigger owner, it will never run. What you could do, is just copy that trigger for each player 1-8, or give it to a computer player that will always be in the game. This should fix it.



None.

Aug 6 2009, 11:40 pm darksnow Post #3



cant you set it under all players?



None.

Aug 6 2009, 11:54 pm poison_us Post #4

Master has given Dobby a doctorate! Dobby is free!

Quote from Trevo4311
Give all [any unit] to force 1
Make sure you have this trigger owned by Force 1, or All players.

It should say "Give all [any unit] owned by Neutral to Force 1."
You might have the trigger owned by an invalid player [9-11, the unknowns, or neutral], or you might have given the trigger to a computer and made it so the "owned by" is followed by "current player" -- which won't work.

You didn't really tell us what's going wrong--whether it's not happening at all, or if it's giving to just one player, etc.




Aug 6 2009, 11:57 pm JaFF Post #5



Quote from darksnow
cant you set it under all players?
Yes you can.

And I see nothing wrong with the trigger. Your problem is probably what Vrael described - you have this trigger for a player that does not run triggers because he either just left the game or is P9+.



None.

Aug 7 2009, 12:06 am rockz Post #6

ᴄʜᴇᴇsᴇ ɪᴛ!

Is this correct? I was under the impression that give all any unit to force 1 would give all any unit to one player (the first player in force 1). Incorrect, see Kaias' post.

If nothing is happening, then Vrael is right.

I'd personally have it owned by force 1, and give 1 any unit to current player.

Post has been edited 1 time(s), last time on Aug 7 2009, 3:55 am by rockz.



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Aug 7 2009, 12:12 am DT_Battlekruser Post #7



I've been away from mapping for a while, but I was under the impression you couldn't use the Give action with groups. Give the trigger to Force 1 and make the action Give to Current Player.



None.

Aug 7 2009, 1:22 am Kaias Post #8



Quote from DT_Battlekruser
I've been away from mapping for a while, but I was under the impression you couldn't use the Give action with groups. Give the trigger to Force 1 and make the action Give to Current Player.
DTBK is absolutely right. You can't give to a group like All players, Forces, or Neutral players, only to individual players. His solution will work as well.



None.

Aug 7 2009, 1:52 am Moose Post #9

meme

Removed incorrect information.

Quote from DT_Battlekruser
I've been away from mapping for a while, but I was under the impression you couldn't use the Give action with groups. Give the trigger to Force 1 and make the action Give to Current Player.
All units will be given to the first player to run the trigger.

DTBK's trigger with give 1 instead of all will suffice and distribute the units within a few trigger cycles depending on the number of players remaining and units owned by the leaving player.

Post has been edited 4 time(s), last time on Aug 7 2009, 2:51 pm by Mini Moose 2707. Reason: Corrections.



None.

Aug 7 2009, 2:37 am Kaias Post #10



Quote from Mini Moose 2707
I'm calling technicaility on the word can't here. You most certainly CAN give units to a force. When you give units to a force, each player on the force receives that amount. (if they exist, of course) Giving to a force does what it is told and does not logically account for an even distribution among the specified receivers. In this case, "all" units is specified. The first player (lowest number) in the force will receive the specified quantity (all) immediately and none will remain for the other players.
The only technical fault is that yes you can do it, but no it doesn't do anything. Starcraft has no way of determining which eligible player to give to or how to distribute it. If you give all the units to Force 1, it will give none away. If you give 1 unit to Force 1, it will again do nothing.

I'm speaking out of both experience and a recently created test map to ensure its veracity.

And yes, Mooses changes to DTBK's suggestion are necessary, I just didn't bother elaborating since it seemed very obvious.



None.

Aug 7 2009, 2:55 am Moose Post #11

meme

I stand corrected. This is the trigger I misremembered from defense maps:

Code
Trigger("\x006Defender"){
Conditions:
    Bring("Player 12", "Any unit", "Anywhere", At least, 1);

Actions:
    Give Units to Player("Player 12", "Current Player", "Any unit", 1, "Anywhere");
    Preserve Trigger();
}




None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[07:32 pm]
Zoan -- I got $2000 bonus. I would like 2000 minerals, please
[2026-4-16. : 4:15 am]
DarkenedFantasies -- you eat lots of beans
[2026-4-16. : 3:46 am]
IskatuMesk -- how do i get gas
[2026-4-15. : 11:43 pm]
Moose -- you don't
[2026-4-15. : 10:06 pm]
Zoan -- how do i get minerals
[2026-4-14. : 11:45 pm]
ClansAreForGays -- Anyone wanna played Skewed StarCraft?
[2026-4-14. : 12:07 am]
Vrael -- NudeRaider
NudeRaider shouted: Vrael ranting still is though
you're a gentleman and a scholar, thank you
[2026-4-13. : 10:07 pm]
NudeRaider -- ya why phone people when you can just write letters
[2026-4-13. : 9:37 pm]
IskatuMesk -- I have never and will never own a phone
[2026-4-13. : 9:15 pm]
NudeRaider -- Vrael ranting still is though
Please log in to shout.


Members Online: anoeth47