GetDist
Gets the distance between two objects, and puts it's value into an attribute.
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
GetDist "<attribute>,<Object1>,<Object2>" -- Gets the distance between <Object1> and <Object2>, and puts it's value into <attribute>.
Example
// Gets the distance between the target and the player
xpt_distCheck
{
actions
{
GetDist "distToPlayer,Object:target,Object:player"
// Target seems to be very close to the player...
IfAttr "distToPlayer < 100 Block begin"
Pattern pt_playerclose
Block end
}
}