In Brood War you could make it a condition that at least one type of unit is in a location. This was useful if you wanted a trigger to fire if say any enemy unit is in a given location and only if.
Is there an equivalent in StarCraft 2's GUI triggers that makes it a condition that a unit type (not an individual unit) is in a given location. Or is there some way to accomplish this through secondary triggers and events? I'm aware there's a function for a unit entering/leaving a location, that's not really what I want.
A region is actually converted into a unit group for using functions, so you should use the "unit in unit group" function, with the "unit group" parameter set to "units in region matching condition", with the condition being the type of unit you are searching for. There is also a "units in region belonging to player" function that can return the owner of the unit. I think this should solve your problem.
Hi there,
In Brood War you could make it a condition that at least one type of unit is in a location. This was useful if you wanted a trigger to fire if say any enemy unit is in a given location and only if.
Is there an equivalent in StarCraft 2's GUI triggers that makes it a condition that a unit type (not an individual unit) is in a given location. Or is there some way to accomplish this through secondary triggers and events? I'm aware there's a function for a unit entering/leaving a location, that's not really what I want.
@Veta20: Go
A region is actually converted into a unit group for using functions, so you should use the "unit in unit group" function, with the "unit group" parameter set to "units in region matching condition", with the condition being the type of unit you are searching for. There is also a "units in region belonging to player" function that can return the owner of the unit. I think this should solve your problem.
Great to be back and part of the community again!
Thanks I think that worked.