Ah, my mistake; setting the Count to 0 in the Enumerate Area will make the validator return true only if there are 0 units with 0 of the buff in that area. What you did was make it so it searched to ensure that an infinite units in the area have 0 of the buff.
In other words, my solution contained a double negative, returning true only if there are 0 units with 0 of the behavior within the area.
The other way you could have fixed it would be by setting the (Basic) Validator: Value field in the Unit Compare Behavior Count validator to evaluate for greater than or equal to 1 or greater than 0; this would make the Enumerate Area validator run true if 0 units in the area have one or more of the buff on them.
Create a Unit Compare Behavior Count validator. Change the (Basic) Validator: Behavior field to the buff behavior and ensure that the (Basic) Validator: Value field is set to 0.
Create an Enumerate Area validator. Set the (Basic) Target: Location + field to Caster Unit/Point. Under the (Basic) Search: Areas + field, click the green plus (+) to add a field. Set the Arc to 360, Compare to Equal To, Count to 0, and the Radius to the desired "nearby"range in which you want the validator to evaluate units for the state of the ability's auto cast. Set the Validator to the Unit Compare Behavior Count validator you created earlier.
From there, assuming you have the auto cast filters and other fields set up correctly for your ability, all you have to do is add this newly created Enumerate Area validator to the Ability: Auto Cast Validators + field of your ability.
I hope I understood your problem correctly; this makes it so that if units with the said buff are within the radius designated in the Enumerate Area validator, the ability will not be auto cast.
Ah, my mistake; setting the Count to 0 in the Enumerate Area will make the validator return true only if there are 0 units with 0 of the buff in that area. What you did was make it so it searched to ensure that an infinite units in the area have 0 of the buff.
In other words, my solution contained a double negative, returning true only if there are 0 units with 0 of the behavior within the area.
The other way you could have fixed it would be by setting the (Basic) Validator: Value field in the Unit Compare Behavior Count validator to evaluate for greater than or equal to 1 or greater than 0; this would make the Enumerate Area validator run true if 0 units in the area have one or more of the buff on them.
Custom Campaign Initiative | Mapster Community Project: Data Wizards
Starcraft II: Unsung Rebels, a custom campaign for Starcraft II
SC2Saver, a way to create saved games via trigger
Frustrated with the editor and would like answers in real time? Join the SC2Mapster Discord!
Create a Unit Compare Behavior Count validator. Change the (Basic) Validator: Behavior field to the buff behavior and ensure that the (Basic) Validator: Value field is set to 0.
Create an Enumerate Area validator. Set the (Basic) Target: Location + field to Caster Unit/Point. Under the (Basic) Search: Areas + field, click the green plus (+) to add a field. Set the Arc to 360, Compare to Equal To, Count to 0, and the Radius to the desired "nearby"range in which you want the validator to evaluate units for the state of the ability's auto cast. Set the Validator to the Unit Compare Behavior Count validator you created earlier.
From there, assuming you have the auto cast filters and other fields set up correctly for your ability, all you have to do is add this newly created Enumerate Area validator to the Ability: Auto Cast Validators + field of your ability.
I hope I understood your problem correctly; this makes it so that if units with the said buff are within the radius designated in the Enumerate Area validator, the ability will not be auto cast.
Custom Campaign Initiative | Mapster Community Project: Data Wizards
Starcraft II: Unsung Rebels, a custom campaign for Starcraft II
SC2Saver, a way to create saved games via trigger
Frustrated with the editor and would like answers in real time? Join the SC2Mapster Discord!