Default Inputs (NPC)

Default NPC:

  • SetRelationship <targetname> <disposition> <rank (integer)>
    Changes whether this NPC likes or dislikes certain others. Used like the ai_relationship entity, with this NPC as the subject. Values for disposition are:

    D_HT : Hate the target.
    D_FR : Fear the target.
    D_LI : Treat the target as a friend.
    D_NU : Treat the target as a neutral party.
  • SetHealth <integer>
    Set the NPC's health to this value.
  • physdamagescale <float>
    Scales the damage taken by this NPC when hit with physics objects. 0 will make the NPC immune to this damage.
  • Ignite
    Makes the NPC burst into flames.

(top)

  • Break
    Smash this NPC into pieces. If not possible, just delete it.
  • Kill
    Deletes the NPC.
  • KillHierarchy
    Deletes the NPC along with any children it may have.
  • StartScripting
    StopScripting
    Enter/exit scripting state, where NPCs ignore a variety of stimulus that would make them break out of their scripts. They ignore danger sounds, ignore the player's Use, don't speak idly or respond to other NPC's idle speech, and so on.

(top)

  • Assault <targetname>
    Start an assault at the given rally point.
  • SetSquad <string>
    Change the name of this NPC's squad. Leaving the parameter blank will remove the NPC from any existing squad.
  • Wake
    Wakes up the NPC if it is sleeping.
  • ForgetEntity <targetname>
    Clears out the NPC's knowledge of a named entity.

(top)

  • GagEnable
    GagDisable
    Gagged NPCs won't speak (or moan, caw, etc.) unless made to during a choreographed scene.
  • IgnoreDangerSounds <float>
    Ignore danger sounds for the specified number of seconds.
  • HolsterWeapon
    UnholsterWeapon
    Force the NPC to holster or unholster their weapon. Ignored if the NPC is scripting or if the NPC doesn't use weapons.
  • HolsterAndDestroyWeapon
    Same as HolsterWeapon, except the weapon is destroyed once it has been concealed.

(top)

  • AddOutput <key> <value> OR <output name> <entity>: <input>: <parameter>: <delay>: <fire only once?>
    Evaluates a keyvalue/output on this entity. Not guaranteed to work and can cause problems so handle with care.
  • Color <RGB> (Default: 255 255 255)
    Set the overall color of the NPC.
  • Alpha <byte>
    Sets the transparency of the NPC.
  • SetDamageFilter <targetname>
    Sets the damage filter this NPC will use. If no name is given, it's forced to use no filter at all.

(top)

  • AddContext <key>: <value>
    Adds to the entity's list of response contexts.
  • RemoveContext <string>
    Remove a context from this NPC's list. The name should match the key of an existing context.
  • ClearContext
    Removes all contexts from this NPC's list.
  • EnableShadow
    DisableShadow
    Toggles the NPC's shadow.

(top)

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License