Data/Validators/Unit Compare Height and Z

### Exemple use

If it is desired to validate that the "target" in the **Unit** field is lower (in altitude) than the other unit in the **Other Unit** field, than this validators takes all its meaning. It is more accurate than a Unit Compare Field validator, which is limited to check only a fixed amount of the unit's height (from data). To bring further this example, let's say the Caster is a Mothership casting Planet Cracker and it is desired to hit any air unit that are below the caster's height to avoid making it look silly: now this is the perfect validator to make sure that the height of the Mothership rends a logical hit on units that are below only, in case that the caster suffers a height loss. Tip for starters: If the target is 3 height above its ground, and the caster mothership is 4 height above its ground, the target can still be higher than the caster mothership in "Z" term (actual real height) as its cliff level is way higher. Use Z instead of Height.

### Important reminder

* Using the "Caster" Add, Ground Height, Height or Z fields **are not sufficient** to effectively compare the Unit location value to the caster. It is imperative to use the "Other Unit" field to compare 2 units. Based on this fact, the reason why one would use these fields without a comparative Other Unit would be to evaluate the caster unit only.
* Any units mentionned in the "**Unit**" Location field is considered to be "Target" according to the target fields.
* Enabling the Caster/Target fields adds them in the "Compare" equation. Be careful, as the logic of what each field does can conflict with the desired outcome.
* Site (Mover) actors are not accepted as an height indicator/value for validation. Since it's the actor that moves in height, the unit itself does not, hence only unit values are checked. This also concerns "Unload, End" animations that units have when they are unloaded from flying transports.
* It seems that a compared unit is always required, as calculating a single unit isn't working.
* A dead unit can make this validator return false and it is annoying if used as a disable validator on a buff behavior. It will cause the buff to always be disabled, unless the compared dead unit location is replaced by another.

## Field Categories

### Caster Add

Adds a quantity of height to be considered in the comparaison. Example: Sometimes, you might want a unit to be higher than the other unit, but not just barely. You could wish it to be "this" quantity higher or lower.

### Caster Ground Height

Checks the actual ground level, of the caster unit. This works exactly as the Location Compare Cliff Level does. It is in fact more precise by calculating cliff edges or unpassable terrains that are gradually ascending or descending.

### Caster Height

Evaluates the Height of the Caster, starting at the current level of the ground below the Unit. A unit on a different level of cliff gets to be evaluated on its own ground level.

### Caster Z

Checks the Height of the Caster based on the actual, real position in height of the Caster unit. Rather than being relative to the current ground level, it is calculated along with it. In other words:

Unit's Height Value + Height of the Ground (starting from the pure bottom) + Modifiers such as Buff Behavior or Modify Unit (Height Modification).

* Has nothing to do with the scale of a model (or its actor) being larger/graphically higher.

### Compare

Main calculation. Compares the **Unit** toward the **Other Unit** or the **Unit** only.

* The operation always goes: The [**Unit**] is [**Compare**] to the [**Other Unit**].

### Other Unit

One that is compared to the **Unit**. Left to "None" will only have the **Unit** have its own Height checked only.

### Target Add

Adds a quantity of height to be considered in the comparaison. Example: Sometimes, you might want a unit to be higher than the other unit, but not just barely. You could wish it to be "this" quantity higher or lower.

### Target Ground Height

Checks the actual ground level, of the target unit. This works exactly as the Location Compare Cliff Level does. It is in fact more precise by calculating cliff edges or unpassable terrains that are gradually ascending or descending.

### Target Height

Evaluates the Height of the Target, starting at the current level of the ground below the Unit. A unit on a different level of cliff gets to be evaluated on its own ground level.

### Target Z

Checks the Height of the Target based on the actual, real position in height of the Caster unit. Rather than being relative to the current ground level, it is calculated along with it. In other words:

Unit's Height Value + Height of the Ground (starting from the pure bottom) + Modifiers such as Buff Behavior or Modify Unit (Height Modification).

* Has nothing to do with the scale of a model (or its actor) being larger/graphically higher.

### Unit

Main location of which target unit is validated. Interacts with the **Target** fields. When comparing 2 unit locations, this unit must be [Compare] to the "Other Unit".

* As stated in the reminder, the Caster Fields will only work if the Caster is mentionned in "Other Unit" or in this field.