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.
[02:53 am]
Mr.BurnLiquid -- Symmetry
Symmetry shouted: I'll check it out this weekend!
Thanks
[02:47 am]
Symmetry -- I'll check it out this weekend!
[02:40 am]
Mr.BurnLiquid -- Symmetry
Symmetry shouted: Another map maker? Damn we really ARE back
I invite you to try out the map I modified. I don't have the creativity to create maps from scratch, but I do have the know-how to modify existing ones; my project is to tweak community campaigns (specifically those with errors—to make them playable.
[02:27 am]
Symmetry -- Another map maker? Damn we really ARE back
[01:51 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: Mr.BurnLiquid actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
Now that I wanted to change my avatar, the error image is showing up, haha.
[01:34 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: Mr.BurnLiquid actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
Mr.BurnLiquid
Mr.BurnLiquid shouted: Ultraviolet Thanks; I'm new to the site and a Spanish speaker. I must have missed the part where it was prohibited—I'll change it now.
I invite you to try out a mission I'm modifying from *StarCraft Reversed*; I'm trying to make it more playable and challenging.
[01:33 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: Mr.BurnLiquid actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
Thanks; I'm new to the site and a Spanish speaker. I must have missed the part where it was prohibited—I'll change it now.
[01:31 am]
Ultraviolet -- Mr.BurnLiquid
Mr.BurnLiquid shouted: Ultraviolet Is it forbidden to have a large avatar?
actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
[12:20 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: https://staredit.net/profile/133367/ dude's avatar is massive
Is it forbidden to have a large avatar?
[12:04 am]
Ultraviolet -- https://staredit.net/profile/133367/ dude's avatar is massive
Please log in to shout.


Members Online: Excalibur