IfDistZ
Conditional function which checks the height difference between the entity and target.
Postal III Ultrapatch+Angel v1.3.0+ Feature
The following function will only work in Postal III Ultrapatch+Angel v1.3.0 or higher.
Syntax
IfDistZ "+- Object:<obj> <operator> <value> <action>" -- Compares calculated height difference without any modifications. (default, and recommended if you want to know if target is over or under you)
IfDistZ "++ Object:<obj> <operator> <value> <action>" -- Turns calculated height difference into positive to check against that, if it's negative.
IfDistZ "-- Object:<obj> <operator> <value> <action>" -- Turns calculated height difference into negative to check against that, if it's positive
Example
// Example code which checks if the target is over, under, or if it doesn't matter, but the difference is still high
xpt_checkHeight
{
actions
{
IfDistZ "+- Object:target < -12 Pattern pt_overme"
IfDistZ "+- Object:target > 12 Pattern pt_underme"
IfDistZ "++ Object:player > 12 Pattern pt_deep"
}
}