Angle and Position functions

SetAngle

Sets, adds, or subtracts from an entity's absolute angle.

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

SetAngle [angle] -- Sets the entity's angle to this fixed value.

SetAngle [angle],add -- Adds more value to this entity's angle.

SetAngle [angle],sub -- Subtracts value from this entity's angle.

TODO

This function might have more parameters in the future.

Example


// This will make the NPC rotate itself every one second
pt_default
{
    actions
    {
        Wait 1.0
        SetAngle 5,add
        Repeat 0
    }
}


SetOrigin

Sets an entity's absolute position.

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

SetOrigin [pointer],[x],[y],[z] -- Sets the entity's position to this position.

SetOrigin [pointer],[pointer2] -- Sets the entity's position to that entity's position.

Example


// This will make the NPC teleport to the player on execution
pt_swooshtoplayer
{
    actions
    {
        TargetPlayer 1
        SetOrigin self,target
    }
}

// This however will make the NPC chain the Player to themselves endlessly
pt_cantescape
{
    actions
    {
        TargetPlayer 1
        SetOrigin target,self
        Wait 3
        Repeat 0
    }
}

// This makes the NPC teleport to a fixed position
pt_tele
{
    actions
    {
        SetOrigin self,423,-231,831
        Pattern pt_surprise
    }
}