What you want is the function "convert player to player group" and provide it with the player you want.
If you don't know which player owns the unit I'm guessing you have a trigger like "unit dies" in which case the function "owner of unit()" should give you the owner of a unit and "triggering unit" should give you the unit that died.
hope this helps.
also
the function "unit type attribute check" can give you that kind of information. Use the function "unit type of unit" on the triggering unit to get the unit type. You will end up with "(unit type of (triggering unit)) has attribute structure == false" as a conditional statement.
Could you give me an example in the trigger editor for the first part? I can't seem to understand it :\ (haven't used the starcraft editor in about 2 years so I'm a bit off :I)
I couldn't be bothered creating the trigger in multiple stages and uploading pictures of it. Sorry, I'm a very lazy person :(
where do you get stuck? Is it changing the "all players" option? click on "all players", then select "function" and there is the option "convert player to player group"
EDIT: maybe lazy is not the right word. Just very slooooooowwwwww like my namesake
As the title states, I can't figure out how to make it owner of unit because the only option I get is all players?
Also what would the condition be to make it just unit deaths and not building deaths?
What you want is the function "convert player to player group" and provide it with the player you want.
If you don't know which player owns the unit I'm guessing you have a trigger like "unit dies" in which case the function "owner of unit()" should give you the owner of a unit and "triggering unit" should give you the unit that died.
hope this helps.
also
the function "unit type attribute check" can give you that kind of information. Use the function "unit type of unit" on the triggering unit to get the unit type. You will end up with "(unit type of (triggering unit)) has attribute structure == false" as a conditional statement.
EDIT: also Bronies are awesome!
@finiteturtles: Go
Could you give me an example in the trigger editor for the first part? I can't seem to understand it :\ (haven't used the starcraft editor in about 2 years so I'm a bit off :I)
I couldn't be bothered creating the trigger in multiple stages and uploading pictures of it. Sorry, I'm a very lazy person :(
where do you get stuck? Is it changing the "all players" option? click on "all players", then select "function" and there is the option "convert player to player group"
EDIT: maybe lazy is not the right word. Just very slooooooowwwwww like my namesake
Event: Unit Dies(Any Unit)
Condition:Comparison( Unit = type of unit)
Action: Play sound(sound) for (Triggering Player)
That should do it.
Theres a screenshot of what I would do, I used Convert player to Playergroup aswell.
condition should be "unit (triggering unit) has structure attribute == false"
"Play sound(sound) for (Triggering Player)"
triggering player returns a player, but the function expects a player group.
"Play sound(sound) for (convert player to player group(Triggering Player))"
^ this should work
@finiteturtles: Go
I can't find 'has structure attribute'? :\
@Ownag3666:
http://i.imgur.com/X7V8q.jpg
created an example trigger in a map I am working on.
@finiteturtles: Go
Finally got it. Thanks for the help. :3