I'm currently trying to make a "pseudo" 3D weapon distance acquisition array using validators.
I am using the "Unit Compare Field" as a means to evaluate whether a target is too high or too low from the casting unit for a weapon to fire at a given range.
However, the validator is not behaving as expected. I have a Combine Validator that tells the weapon effect that a target should (via Unit Compare Field):
A-have a height less than or equal to 1 relative to the caster unit
B-have a height greater than or equal to -1 relative to the caster unit
The only targets that are acquirable through this means are targets at exactly the same height as the caster unit (so in this case other Battlecruisers). It doesn't matter if I change the numbers to 3 or 10, the weapons will only target other targets on the exact same plane.
Is the combine OR or AND logic? Also what do you want to achieve with a validator like this? Have you checked you are setting the Other Unit field correctly?
Also the validator you are using does not take into account modifications to height values. It only compares base field values.
Also the validator you are using does not take into account modifications to height values. It only compares base field values.
Aww crap, I guess that explains it...my fighters are dynamically changing their height every time they engage a target, so clearly validating their base value won't work...*sigh*
I suppose I'll have to go about it the very very long way and have behaviour stacks added each time a unit goes up or down 1 height and work my way from there with behaviour validators...
I don't suppose there's a validator that DOESN'T involve adding a crap ton of behaviours that would fit the bill nicely here?
Is the combine OR or AND logic? Also what do you want to achieve with a validator like this? Have you checked you are setting the Other Unit field correctly?
It was "And". The intention initially was just to test if I could have my Battlecruiser shoot at targets with its weapon at all targets 1 height above, same height and 1 height below the Battlecruiser, and ignoring any targets that are 2+ height difference or more away relative to the Battlecruiser.
If that HAD worked, I would'v made a bunch of combine validators to check the same things for greater heights (ex. 2-4 range above and below the BC, 4-6 range, etc), but with additional "Location Range" validators to tell the weapon to shoot them at lower ranges only to compensate for the height difference (since range + height = hypotenuse, and the hypotenuse is always longer than its two adjacent sides).
And lastly, I'm not quite sure what the "Other Unit" field does, I was under the impression that it simply told the validator to compare the "Unit" field to itself.
Hello again,
I'm currently trying to make a "pseudo" 3D weapon distance acquisition array using validators.
I am using the "Unit Compare Field" as a means to evaluate whether a target is too high or too low from the casting unit for a weapon to fire at a given range.
However, the validator is not behaving as expected. I have a Combine Validator that tells the weapon effect that a target should (via Unit Compare Field):
A-have a height less than or equal to 1 relative to the caster unit
B-have a height greater than or equal to -1 relative to the caster unit
The only targets that are acquirable through this means are targets at exactly the same height as the caster unit (so in this case other Battlecruisers). It doesn't matter if I change the numbers to 3 or 10, the weapons will only target other targets on the exact same plane.
Why does this not work?
Is the combine OR or AND logic? Also what do you want to achieve with a validator like this? Have you checked you are setting the Other Unit field correctly?
Also the validator you are using does not take into account modifications to height values. It only compares base field values.
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
Aww crap, I guess that explains it...my fighters are dynamically changing their height every time they engage a target, so clearly validating their base value won't work...*sigh*
I suppose I'll have to go about it the very very long way and have behaviour stacks added each time a unit goes up or down 1 height and work my way from there with behaviour validators...
I don't suppose there's a validator that DOESN'T involve adding a crap ton of behaviours that would fit the bill nicely here?
It was "And". The intention initially was just to test if I could have my Battlecruiser shoot at targets with its weapon at all targets 1 height above, same height and 1 height below the Battlecruiser, and ignoring any targets that are 2+ height difference or more away relative to the Battlecruiser.
If that HAD worked, I would'v made a bunch of combine validators to check the same things for greater heights (ex. 2-4 range above and below the BC, 4-6 range, etc), but with additional "Location Range" validators to tell the weapon to shoot them at lower ranges only to compensate for the height difference (since range + height = hypotenuse, and the hypotenuse is always longer than its two adjacent sides).
And lastly, I'm not quite sure what the "Other Unit" field does, I was under the impression that it simply told the validator to compare the "Unit" field to itself.
@MidnightCrisis: Go
I would advise going for a trigger/data hybrid in your case.
The other field of validators allows you to compare two units relative to each other (especially with the delta logic).
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