TransformInto

Turns an entity into a scriptifiable entity.

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

Uses database from cr_spawnitem.txt.

Can't be used on the Player, but it can be used on it's target.

Syntax

TransformInto target,[name] -- Turns the target into this scriptified entity.

TransformInto self,[name] -- Turns self into this scriptified entity.

Example

// This turns the entity into shit, literally
xpt_dogshit
{
    actions
    {
        TransformInto self,Poop
    }
}

Example (cr_spawnitem.txt)

"cr_spawnitem.txt"
{
    "Poop"
    {
        "model"         "models/small_things/shit_01.mdl"   // Path to model
        "type"          "prop_p3_fsmitem"                   // This can be 'prop_p3_fsmitem' or 'prop_dynamic'
        "solid"         "0"                                 // Should it be solid?
        "copytarget"    "0"                                 // Should it copy the entity's target to the newly created entity?
        "behavior"      "bh_shit"                           // The behavior of the new entity
        "manner"        "itmShit"                           // The manner of the new entity
        "faction"       "Items"                             // The faction of the new entity
        "initState"     "st_init"                           // The init state of the new entity
        "itemType"      "3" // ITM_P3_SHIT                  // The item type of the new entity (look inside Inventory func page)
    }
}