Article Template - NPC
npc_pic01_t.png
The super zombie in all its fiery glory.
Health 500
Attack(s) Headbutt (10)
Hellfire (20)
Typical Weapon(s) Flamethrower
Laser Gun
Model superzombie.mdl
First Found… dm_plaza17
npc_pic02_t.jpg
Terrorizing a team of soldiers.

Description Convars Keyvalues Flags Inputs Outputs Other NPCs

Description

npc_superzombie is the entity name for filler filler filler. This section should give a brief overview of the NPC and how it interacts with the player or its environment.

Convars

This is where convars tied to this NPC will go. Mind to cut this section and the convar tab out if they have none.

  • sk_superzombie_hellfire <integer> ( Default: 20 )
    Sets the damage that each thrown fireball inflicts.
  • sk_superzombie_speedmult <float> ( Default: 5 )
    Scales the super zombie's speed, with 1 being the normal zombie speed.

Keyvalues

This section is for any keyvalues tied to this NPC.

  • CanHellfire <boolean> ( Default: 0 )
    When enabled, the super zombie can launch homing fireballs from his hands.

Default NPC:

  • target <targetname>
    Upon spawning, NPC will move to the location of this path_corner.
  • targetname <string>
    Assigns the NPC a targetname, used by other entities to refer to the NPC. Can be shared by other entities.
  • squadname <string>
    Assigns NPC to a squad. NPCs with the same squad will report targets to the group and cover each other.

(top)

  • hintgroup <string>
    Gives NPC the name of a hint node group. The NPC will ignore other hint nodes in the map that do not share this group name.
  • hintlimiting <boolean>
    Limits NPC to using the above hint group for navigation requests, but does not limit local navigation.
  • sleepstate <see below]
    Used to set the NPC into stasis and under what conditions it will wake up.

    0 : Awake.
    1 : Wait for a threat. Once found, wake up.
    2 : Wait for PVS.
    3 : Wait for an input.

(top)

  • wakeradius <float>
    The NPC will wake from its sleep if the player comes within this distance.
  • wakesquad <boolean>
    Toggles whether this NPC's squad mates will wake up along with him.
  • lightingoriginhack <targetname>
    Uses an info_lighting_relative to specify a location to sample lighting from, instead of using the NPC's origin.

(top)

  • physdamagescale <float>
    Multiplies damage taken by this NPC when hit with physics objects. 0 will make the NPC immune to this damage.
  • rendermode <0-7, 9, 10>
    Changes how the NPC is rendered in-game. See Render Modes.
  • renderamt <byte>
    The FX amount used by the above rendering mode.

(top)

  • rendercolor <RGB>
    The FX color used by the above rendering mode.
  • disablereceiveshadows <boolean>
    Prevents the NPC from having shadows cast on it.
  • model <string>
    Changes the NPC's model path (ex. models\player\player.mdl).

Flags

Except where noted, flags are OFF by default.

This section is for any flags tied to this NPC.

  • 131072 : NPC can phase through walls and physics objects.

Default NPC:

  • 1 : NPC is inactive until seen.
  • 2 : NPC is muted until it's angry.
  • 4 : NPC falls to ground instead of teleporting to ground. (Default: ON)
  • 8 : NPC drops a health kit (or battery) upon death.
  • 16 : NPC doesn't acquire enemies or avoid obstacles.
  • 128 : NPC is inactive until called by a script.
  • 256 : NPC uses long-range behavior. Sees and shoots farther than normal.
  • 512 : NPC's corpse fades.
  • 1024 : NPC will think outside of their PVS.
  • 2048 : NPC is set up as a template and won't spawn until called by a template maker.
  • 4096 : NPC uses alternate collision (player avoidance).
  • 8192 : NPC doesn't drop weapons upon death.
  • 16384 : NPC won't budge from the player's pushing.

Inputs

This section is for any inputs tied to this NPC.

  • ThrowHellfireAtTarget <targetname>
    The super zombie throws a homing fireball at this target entity.

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)

Outputs

This section is for any outputs tied to this NPC.

  • OnThrownHellfire
    Fires once the zombie has finished tossing a fireball.

Default NPC:

  • OnDamaged
    Fired when this NPC takes damage. (!activator is the damage inflicter).
  • OnDeath
    Fired when this NPC is killed. (!activator is the killer).
  • OnHalfHealth
    Fired when this NPC reaches half of its maximum health.
  • OnHearWorld
    Fired when this NPC hears a sound (other than combat or the player).

(top)

  • OnHearPlayer
    Fired when this NPC hears the player.
  • OnHearCombat
    Fired when this NPC hears combat sounds such as shots or bomb explosions.
  • OnFoundEnemy <targetname>
    Fired when this NPC establishes line of sight to its enemy.
  • OnLostEnemyLOS
    Fired when this NPC loses line of sight to its enemy.

(top)

  • OnLostEnemy
    Fired when this NPC loses its enemy. Usually due to the enemy being killed/removed, or because this NPC has selected another target.
  • OnFoundPlayer <targetname>
    Fired when this NPC establishes line of sight to its enemy, and that enemy is a player.
  • OnLostPlayerLOS
    Fired when this NPC loses line of sight to its enemy, and that enemy is a player.
  • OnLostPlayer
    Fired when this NPC loses its enemy, and that enemy was a player. Usually due to the enemy being killed/removed, or because this NPC has selected another target.

(top)

  • OnDamagedByPlayer
    Fired when this NPC is hurt by a player (!activator is the attacker or vehicle driver (if friendly fire).
  • OnDamagedByPlayerSquad
    Fired when this NPC is hurt by a player OR by one of the player's squad mates (!activator is the attacker or vehicle driver (if friendly fire).
  • OnDenyCommanderUse
    Fired when this NPC has refused to join the player's squad.
  • OnWake
    Fired when this NPC comes out of a sleep state.

(top)

See the regular NPC pages for examples of this template in use.



SMOD NPCs

Friendlies

     Citizen, Medic  •  Citizen, UM  •  Combine, Cmp.  •  Kleiner, Cmp.  •  Monk, Cmp.  •  Crossbow Turret, Frn.  •  Floor Turret, Frn.  •  Laser Turret, Frn.  •  Rocket Turret, Frn.

Hostiles

     Combine, Ace  •  Combine, Cloaked  •  Combine, Elite  •  Combine, Prison Guard  •  Houndeye  •  Kamikaze Crab  •  K Scanner  •  Laser Turret  •  Rocket Turret  •  Zombie V2

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