CheckAttrEx

Extended/Alternative version of CheckAttr.

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

CheckAttrEx "<target object> Home:<target2 object> <action>" -- Checks if <target object> has the Home flag (normally this would mean they are a home intruder).

CheckAttrEx "<target object> <attribute> <action>" -- Checks if <target object> has <attribute>.

Example

// Example code of trespassing
xpt_OnVisible
{
    actions
    {
        TargetCaller 1

        IfAttr "RelationTo:target == Relation:enemy State st_start"
        IfAttr "RelationTo:target == Relation:fear  State st_start"

        CheckAttrEx "Object:caller Home:self Block begin"
            Timer tTrespassBlob,15
            Headblob 5,HomeTrespass
            ExecutePattern st_idle.xpt_Trespasser
            Return 1
        Block end

        ...
    }
}