Template:I BaseNPC: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Robot: fixing template case.)
m (Robot: fixing template case.)
Line 27: Line 27:
* '''SetHealth <integer>'''
* '''SetHealth <integer>'''
: Set this NPC's health.
: Set this NPC's health.
* '''{{ep2 add|AddHealth <integer>}}'''
* '''{{EP2 add|AddHealth <integer>}}'''
: Add to NPC's health.
: Add to NPC's health.
* '''{{ep2 add|RemoveHealth <integer>}}'''
* '''{{EP2 add|RemoveHealth <integer>}}'''
: Remove fromNPC's health.
: Remove fromNPC's health.


Line 41: Line 41:
* '''Ignite'''
* '''Ignite'''
: Ignite, burst into flames
: Ignite, burst into flames
* '''{{ep2 add|IgniteLifetime}}'''
* '''{{EP2 add|IgniteLifetime}}'''
* '''{{ep2 add|IgniteNumHitboxFires}}'''
* '''{{EP2 add|IgniteNumHitboxFires}}'''
* '''{{ep2 add|IgniteHitboxFireScale}}'''
* '''{{EP2 add|IgniteHitboxFireScale}}'''


* '''Break'''
* '''Break'''
Line 87: Line 87:
: Update (or Create) this NPC's memory of an enemy and its location
: Update (or Create) this NPC's memory of an enemy and its location


* '''{{ep2 add|BecomeRagdoll}}'''
* '''{{EP2 add|BecomeRagdoll}}'''

Revision as of 19:20, 19 January 2009

Template:I targetname

  • SetRelationship <string>
Changes this entity's relationship toward another entity or class. (Used like the ai_relationship entity, with this NPC as the subject.)
Format: <target> <disposition> <rank>
<disposition> values:
Literal Value Description
D_HT Hate
D_FR Fear
D_LI Like
D_NU Neutral
  • SetHealth <integer>
Set this NPC's health.
Add to NPC's health.
Remove fromNPC's health.
  • SetBodyGroup <integer>
HACK: Sets this NPC's body group (from 0 - n). You'd better know what you are doing!
  • physdamagescale <float>
Sets the value that scales damage energy when this character is hit by a physics object.
Note.pngNote:0 means this feature is disabled for backwards compatibility.
  • Ignite
Ignite, burst into flames
  • Break
Break, smash into pieces
  • StartScripting
Enter scripting state. In this state, NPCs ignore a variety of stimulus that would make them break out of their scripts: They ignore danger sounds, ignore +USE, don't idle speak or respond to other NPC's idle speech, and so on.
  • StopScripting
Exit scripting state.
Start an assault. Parameter passed in should be the name of the rally point.
Set the name of this NPC's squad. It will be removed from any existing squad automatically. Leaving the parameter blank will remove the NPC from any existing squad.
  • Wake
Wakes up the NPC if it is sleeping.
  • ForgetEntity <target_destination>
Clears out the NPC's knowledge of a named entity.
  • GagEnable
Turn on the NPC Gag flag. NPC won't speak outside of choreographed scenes.
  • GagDisable
Turn off the NPC Gag flag.
  • IgnoreDangerSounds <float>
Ignore danger sounds for the specified number of seconds.
  • HolsterWeapon (in all games since Half-Life 2: Episode One)
Force the NPC to holster their weapon. Ignored if the NPC is scripting, if the NPC's weapon is already holstered, or if the NPC doesn't use weapons.
  • HolsterAndDestroyWeapon (in all games since Half-Life 2: Episode One)
Identical to HolsterWeapon, except the weapon is destroyed once it has been holstered and concealed.
  • UnholsterWeapon (in all games since Half-Life 2: Episode One)
Force the NPC to draw their weapon. Ignored if the NPC is scripting, if the NPC's weapon is already drawn, or if the NPC doesn't use weapons.
  • ForceInteractionWithNPC <string> (in all games since Half-Life 2: Episode One)
Force the NPC to use a dynamic interaction with another NPC.
Parameter format: <target NPC name> <dynamic interaction name>
  • UpdateEnemyMemory <target_destination> (in all games since Half-Life 2: Episode One)
Update (or Create) this NPC's memory of an enemy and its location