So I've been trying to get this trigger to work for the better part of a day, and I've finally given up and decided to ask for help.
This is what I am trying to do:
Say you have two regions, ControlRegion and BigRegion. BigRegion contains some enemy buildings, one of which is invulnerable. If your unit moves into ControlRegion, the game checks to see if any non-invulnerable enemy units are contained in BigRegion. If there are no such units, you gain control of the invulnerable building. If there are enemy non-invulerable units/structures in BigRegion, you do not gain control of anything in the area, and you must destroy the remaining units in BigRegion before you can capture the invulnerable building.
The preset function titled "Units In Region With Alliance To Player" seemed to be exactly what I was looking for. The parameters I chose are:
(Units in BigRegion having alliance Enemy with player (Triggering Player) matching (Excluded: Missile, Dead, Hidden, Invulnerable, with at most Any Amount) == (Enemy Unit Group)
But this doesn't work. Even if I put no units at all in BigRegion, it still doesn't work. I've messed with the exclusions, and the amounts. The only way I've gotten it to somewhat work is switching the == to !=, which defeats the entire purpose of the trigger. So I assume that the first section (Units in BigRegion...) returns a unit group that is not empty.
Am I an idiot and using this trigger wrong or is it a bug of some kind? Or am I not understanding what unit groups are? Or possibly (and I doubt that this is true...and hope it isn't) that the == is literal and is testing to see if the two unit groups are the same group, rather than contain the same information (nothing)?
So I've been trying to get this trigger to work for the better part of a day, and I've finally given up and decided to ask for help.
This is what I am trying to do:
Say you have two regions, ControlRegion and BigRegion. BigRegion contains some enemy buildings, one of which is invulnerable. If your unit moves into ControlRegion, the game checks to see if any non-invulnerable enemy units are contained in BigRegion. If there are no such units, you gain control of the invulnerable building. If there are enemy non-invulerable units/structures in BigRegion, you do not gain control of anything in the area, and you must destroy the remaining units in BigRegion before you can capture the invulnerable building.
The preset function titled "Units In Region With Alliance To Player" seemed to be exactly what I was looking for. The parameters I chose are:
(Units in BigRegion having alliance Enemy with player (Triggering Player) matching (Excluded: Missile, Dead, Hidden, Invulnerable, with at most Any Amount) == (Enemy Unit Group)
But this doesn't work. Even if I put no units at all in BigRegion, it still doesn't work. I've messed with the exclusions, and the amounts. The only way I've gotten it to somewhat work is switching the == to !=, which defeats the entire purpose of the trigger. So I assume that the first section (Units in BigRegion...) returns a unit group that is not empty.
Am I an idiot and using this trigger wrong or is it a bug of some kind? Or am I not understanding what unit groups are? Or possibly (and I doubt that this is true...and hope it isn't) that the == is literal and is testing to see if the two unit groups are the same group, rather than contain the same information (nothing)?
Help :(
Why are you comparing two unitgroups?
Just count the units in the group you just made, and see if there are any?
@MotiveMe: Go
That did indeed work, thanks :)