Staredit Network > Forums > SC2 Assistance > Topic: Give all units
Give all units
Nov 1 2010, 11:39 pm
By: Bolshevik09  

Nov 1 2010, 11:39 pm Bolshevik09 Post #1



its weird how original star craft editor had functions such as "all" or "quantity"
how do you run a trigger like this: 'attach model to all marines owned by player 7?'
Or
"Kill all units owned by player 4"
That all preset isn't anywhere!
GREAT



None.

Nov 2 2010, 1:18 am payne Post #2

:payne:

Probably use the "Pick Each Unit" action in conjunction with "Unit Type" and "Kill Picked Unit".



None.

Nov 2 2010, 4:15 am Bolshevik09 Post #3



Quote from payne
Probably use the "Pick Each Unit" action in conjunction with "Unit Type" and "Kill Picked Unit".
wonder why they cut the ALL functions out. Maybe blizzard should look into this or respond to why it was cut



None.

Nov 2 2010, 5:16 am payne Post #4

:payne:

Quote from Bolshevik09
Quote from payne
Probably use the "Pick Each Unit" action in conjunction with "Unit Type" and "Kill Picked Unit".
wonder why they cut the ALL functions out. Maybe blizzard should look into this or respond to why it was cut
This kind of question happens quite frequently.
For example, why must we use Player Groups with the "Text Message" action? Why can't we display a message to a Player directly? >_>



None.

Nov 2 2010, 6:10 pm Temp Post #5



It is probably a question of efficiency the way data is stored in SC2 is probably very different than SC1 and so there is no direct access to "all" of anything. And maybe calculating "all" of most things is fairly inefficient and so they did not add it into the game directly so people would use it less and use better solutions more often. Of course maybe they just designed it this way because they thought it was a better way of doing things.

Also payne would you really want that function to work the other way around? You want to send the message to 8 players so you need to have the action 8 times? Id much rather have to have a player group of size 1 when I need to send a message to 1 person than have the same action 8 times.



None.

Nov 2 2010, 6:14 pm payne Post #6

:payne:

Quote from Temp
Also payne would you really want that function to work the other way around? You want to send the message to 8 players so you need to have the action 8 times? Id much rather have to have a player group of size 1 when I need to send a message to 1 person than have the same action 8 times.
I by far prefer using Pick Each Integer (1 to 8) then having to set a Player Group and recall it after. ;o



None.

Nov 2 2010, 6:22 pm Roy Post #7

An artist's depiction of an Extended Unit Death

Quote from Bolshevik09
wonder why they cut the ALL functions out. Maybe blizzard should look into this or respond to why it was cut
If Blizzard was going to address this, it would have been done for Warcraft III's editor. The general concept is starting broad and filtering down. Unit Group's default pick action is picking all alive units in the entire map for all players, and you can filter it from there. Making the unit group is about as much effort as making the entire action in SC1, but the structure is much more powerful because you can apply that unit group to nearly any other action, whereas in SC1 you could not (i.e. Disable Doodad State only applied to one unit at a time in SC1).

Quote from payne
This kind of question happens quite frequently.
For example, why must we use Player Groups with the "Text Message" action? Why can't we display a message to a Player directly? >_>
That's actually a legitimate question. I guess Blizzard assumed that you would be sending messages to more than one player more often. There's always the "Convert Player to Player Group" function, though, which I suppose is easier/looks cleaner than having to pick each player.

Anyway, you can make functions in SC2 to better match SC1's actions, but it requires a lot of work. You'd have to make accompanying actions in most cases, but the function would look a little like this:

allUnits
    Options: Function
    Return Type: Unit Group
    Parameters
        Location = (Entire map) <Region>
        Number = (Number of Living units in returnedGroup) <Integer>
        Player = 0 <Integer>
    Grammar Text: Get Number units at Location owned by player Player
    Hint Text: (None)
    Custom Script Code
    Local Variables
        returnedGroup = (Empty unit group) <Unit Group>
    Actions
        General - Return (Any units in Location owned by player Player matching Excluded: Missile, Dead, Hidden, with at most Number)


Then you could just do "Pick all units in allUnits(Number, Location, Player)" to get a number of units in a location owned by a player, but I don't see why you would want to limit the unit group to this.

SC2 is more verbose, but it is certainly more powerful than SC1. You can specify dead units, flying units, units matching any condition, etc. Get used to the syntax and it will be more beneficial, even if you have to say kill unit by "Pick every unit in (Units in entire map owned by player 1 matching condition with at most any amount) and do Actions: - Kill picked unit."




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[11:50 pm]
O)FaRTy1billion[MM] -- nice, now i have more than enough
[11:49 pm]
O)FaRTy1billion[MM] -- if i don't gamble them away first
[11:49 pm]
O)FaRTy1billion[MM] -- o, due to a donation i now have enough minerals to send you minerals
[2024-4-17. : 3:26 am]
O)FaRTy1billion[MM] -- i have to ask for minerals first tho cuz i don't have enough to send
[2024-4-17. : 1:53 am]
Vrael -- bet u'll ask for my minerals first and then just send me some lousy vespene gas instead
[2024-4-17. : 1:52 am]
Vrael -- hah do you think I was born yesterday?
[2024-4-17. : 1:08 am]
O)FaRTy1billion[MM] -- i'll trade you mineral counts
[2024-4-16. : 5:05 pm]
Vrael -- Its simple, just send all minerals to Vrael until you have 0 minerals then your account is gone
[2024-4-16. : 4:31 pm]
Zoan -- where's the option to delete my account
[2024-4-16. : 4:30 pm]
Zoan -- goodbye forever
Please log in to shout.


Members Online: lizethetyler