I'm working on a map to make it where after you kill all units of a certain type it will trigger the actions. I couldn't find anything specific so I just added them all to a unit group and checked to see if that unit group = empty unit group. This doesn't work. Is my logic here wrong? and if so, what would be the best way to go about something where the last unit of type is killed, do something.
Or when a unit is killed get its unit type and check in the whole map if you can find living units of that type. Sorry if it isnt of much help or is just wrong, but I'm not a trigger wizard so I think it would work, not sure though.
If you have lots of dying units though that might be an issue - as you would then have the trigger executing for say missiles and the like as well. Right?
If Number of units of (Unit Type in entire map matching condition) = 0
Actions
Do something.
This is done by clicking on the bracket at the start of the condition and selection Number of units in unit group.
Then you click on the bracket for Unit Group and in the functions, change it to "Unit in Region matching condition" Then it will have "Any Units" and i think you can change that to "Triggering unit" in the function.
If not, you can have a specific trigger for each type of unit checking the number of units for each type.
I'm working on a map to make it where after you kill all units of a certain type it will trigger the actions. I couldn't find anything specific so I just added them all to a unit group and checked to see if that unit group = empty unit group. This doesn't work. Is my logic here wrong? and if so, what would be the best way to go about something where the last unit of type is killed, do something.
Or when a unit is killed get its unit type and check in the whole map if you can find living units of that type. Sorry if it isnt of much help or is just wrong, but I'm not a trigger wizard so I think it would work, not sure though.
Thanks guys, I'll be trying both methods.
@Naxxum: Go
If you have lots of dying units though that might be an issue - as you would then have the trigger executing for say missiles and the like as well. Right?
@Naxxum: Go
Any Unit dies
If Number of units of (Unit Type in entire map matching condition) = 0
Actions Do something.
This is done by clicking on the bracket at the start of the condition and selection Number of units in unit group.
Then you click on the bracket for Unit Group and in the functions, change it to "Unit in Region matching condition" Then it will have "Any Units" and i think you can change that to "Triggering unit" in the function.
If not, you can have a specific trigger for each type of unit checking the number of units for each type.
@stevehammon: Go
Thanks, this was much more of what I was looking for.
@Naxxum: Go
No worries :D