Various Targeting Functions

AssistTarget

Sets current target/enemy as target object internally for script.

Syntax

AssistTarget 1 -- Sets current target/enemy as target object internally

Example


pt_npcdead
{
    actions
    {
        IfAttr "ea_Manner == Manner:JusticeMan Block begin"
            TargetCaller 1
            Weapon select,ranged
            AssistTarget 1
            Relationship target,enemy
            State st_start
        Block end
    }
}


AssistEnemy

Unused Postal3Script function

Sets current target's enemy as target

Syntax

AssistEnemy 1 -- Sets current target's enemy as target


ArrestTarget

Unused Postal3Script function

Arrests the target.

    Note

  • Target object must be the Player
  • Only works for p3_npc_cop NPCs
  • This is an old function that's not guranteed to properly work.

Syntax

ArrestTarget true -- Target is arrested

ArrestTarget false -- Target is no longer arrested

Example


// from ai_st5_temp.p3s
st_test_arrest
{
    group Neutral
    patterns
    {
        pt_arrest
        {
            actions
            {
                FreeMovement false
                TargetPlayer 1
                ArrestTarget true
                Wait 30
                ArrestTarget false
                State st_start
            }
        }
    }
}


BusyTarget

Unused Postal3Script function

Sets target's busy state internally

Note

Can target self

Syntax

BusyTarget true -- Target is busy

BusyTarget false -- Target is no longer busy

Example


// from ai_st11_urza.p3s
st_p3_buy_cash
{
    group Neutral
    patterns
    {
        pt_default
        {
            actions
            {   
                BusyTarget true // SELLER IS BUSY
                targetToMem 2   // mem2 is seller
                targetFromMem 1 // target is thing
                FreeMovement false
                Sequence itm_discard
                WaitForEnd 1
                targetFromMem 2 //target is seller
                FireEvent NeedBuy
            }
        }
    }
}