IfBehavior

Checks if an entity's behavior is equal to this condition.

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

IfBehavior "<behavior to check against> Block begin"
    // do stuff
Block end

Example

// Assuming this is in the parent behavior of bh_dog and bh_cat (bh_animal)
xpt_checkanimal
{
    actions
    {
        IfBehavior "bh_dog Block begin"
            State st_dog
        Block end

        IfBehavior "bh_cat Block begin"
            State st_cat
        Block end
    }
}