Ive spent all day trying to get an Enumerate Area Validator working for my special weapon.
No matter what I did it just would not work according to the data I input.
After a bunch of probing tests the only conclusion I can come to is that Enumerate Area's LessThanOrEqualTo for Validator: Compare is borked. (meaning it acts like a LessThan)
Basically if the number of units in the area that DON'T have the specified behavior is less than or equal to 1, the initial effect of the weapon is validated and should be called.
I know it sounds like a weird validation, but its just the first part of an intended chain. The chain is going to be complicated and I wanted to ensure each part was working as intended.
So I set up a test area. 4 units.
One with the special weapon. Type A
One with the Special Behavior. Type B
Two with neither. Type C
First test, I put one Type B unit, and one Type C unit within the arc of the Type A unit's special weapon.
Theoretically the weapon should fire, because the validator should exclude the Type B unit but find the Type C unit.
The total would then equal 1 which is not less than, but is equal to the Search: Count.
But it fails, and does not fire.
After trying to figure out what I had set wrong in the weapon and behavior, I came back and did a series of tests on the Validator.
After much testing I changed the Search: Count to 2. Which surprisingly worked.(as baffling and senseless as that is)
I then tested some arrangements of the units, just to confirm what I was suspecting:
One Type C unit within the arc of the Type A unit's special weapon. Successful fire. (Expected Non-Behavior Units: 1)
One Type B unit within the arc of the Type A unit's special weapon. Successful fire. (Expected Non-Behavior Units: 0)
Two Type C units within the arc of the Type A unit's special weapon. Failure to fire. (Expected Non-Behavior Units: 2)
One Type B unit, and One Type C unit within the arc of the Type A unit's special weapon. Successful fire. (Expected Non-Behavior Units: 1)
One Type B unit, and Two Type C units within the arc of the Type A unit's special weapon. Failure to fire. (Expected Non-Behavior Units: 2)
As you can see the two times the weapon failed to fire was when the validator found 2 units that did not have the special behavior, even though the Validator: Compare field is set to Less Than Or Equal To, and the Search: Count set to 2. Based on these setting all of those tests should have resulted in a successful fire. But these ARE the results you would expect if the Validator: Compare was just Less Than.
Do you guys get similar results?
Is this known?(There isn't an Enumerate Area page on the wiki)
I completely forgot that the unit I was using to test it, spawns a hidden unit.
So it was actually counting as two units on its own.
(I was using my wall that blocks vision of friendly units by spawning a neutral vision blocker unit)
Ugh... I am both relieved that I figured out why it wasn't working, and embarrassed I not only made such dumbass blunder but made a huge blathering post about it. D:
Ive spent all day trying to get an Enumerate Area Validator working for my special weapon.
No matter what I did it just would not work according to the data I input.
After a bunch of probing tests the only conclusion I can come to is that Enumerate Area's LessThanOrEqualTo for Validator: Compare is borked. (meaning it acts like a LessThan)
I set it up as follows:
Basically if the number of units in the area that DON'T have the specified behavior is less than or equal to 1, the initial effect of the weapon is validated and should be called.
I know it sounds like a weird validation, but its just the first part of an intended chain. The chain is going to be complicated and I wanted to ensure each part was working as intended.
So I set up a test area. 4 units.
One with the special weapon. Type A
One with the Special Behavior. Type B
Two with neither. Type C
First test, I put one Type B unit, and one Type C unit within the arc of the Type A unit's special weapon.
Theoretically the weapon should fire, because the validator should exclude the Type B unit but find the Type C unit.
The total would then equal 1 which is not less than, but is equal to the Search: Count.
But it fails, and does not fire.
After trying to figure out what I had set wrong in the weapon and behavior, I came back and did a series of tests on the Validator.
After much testing I changed the Search: Count to 2. Which surprisingly worked.(as baffling and senseless as that is)
I then tested some arrangements of the units, just to confirm what I was suspecting:
As you can see the two times the weapon failed to fire was when the validator found 2 units that did not have the special behavior, even though the Validator: Compare field is set to Less Than Or Equal To, and the Search: Count set to 2. Based on these setting all of those tests should have resulted in a successful fire. But these ARE the results you would expect if the Validator: Compare was just Less Than.
Do you guys get similar results?
Is this known?(There isn't an Enumerate Area page on the wiki)
Used to be on the legacy wiki.
I too have noticed discrepancies with that validator. Especially if you change the two count fields. One day I will make a proper test map.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
!!!!!!
Disregard this actually.
I think I spent the day being dumb.
I completely forgot that the unit I was using to test it, spawns a hidden unit.
So it was actually counting as two units on its own.
(I was using my wall that blocks vision of friendly units by spawning a neutral vision blocker unit)
Ugh... I am both relieved that I figured out why it wasn't working, and embarrassed I not only made such dumbass blunder but made a huge blathering post about it. D:
All is forgiven, it is an easy mistake to make. And you are correct in that the enumerate area validator is cryptic in its operation.
If you still desire, I can explain how the areas work, and how the overall validator ends up working.
Certainly. Who knows what future use Ill need for them, so any info would be great.