IfCurState

Checks if entity is in a specified State.

Postal III Ultrapatch+Angel v1.3.0+ Feature

The following function will only work in Postal III Ultrapatch+Angel v1.3.0 or higher.

Note

Can only work with Block begin and Block end.

Syntax


IfCurState "[state to check] Block begin"
// do stuff
Block end

Example


// Checks if the entity is in st_idle state
xpt_checkidle
{
    actions
    {
        IfCurState "st_idle Block begin"
            SetAttr "idling 1"
            Return 1
        Block end

        SetAttr "idling 0"
    }
}