Npc puppet: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Changed parameters of {{this is a}} to comply with the updated version. This action was performed by a bot.)
(-added class hierarchy, concise page)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{this is a|point entity|name=npc_puppet}} It is a puppet entity that mimics the animations of a target NPC.
{{CD|CNPC_Puppet|file1=1}}
{{this is a|model entity|name=npc_puppet|game=Half-Life 2}} It is a puppet entity that mimics the animations of a target NPC.


For example, place a combine soldier then an npc_puppet and edit the npc_puppet to follow the soldier and it will mimic whatever the soldier does.
For example, place a combine soldier then an npc_puppet and edit the npc_puppet to follow the soldier and it will mimic whatever the soldier does.


== Keyvalues ==
== Keyvalues ==
{{KV|Animation target|target_source|NPC entity to mimic.}}
{{KV|Target attachment point name|string}}
{{KV BaseNPC}}
{{KV Targetname}}
{{KV Targetname}}
{{KV Parentname}}
{{KV|Animation target|intn=animationtarget|target_source|NPC entity to mimic.}}
{{KV Studiomodel}}
{{KV|Target attachment point name|intn=attachmentname|string}}
 
== Flags ==
{{Fl BaseNPC}}


== Inputs ==
== Inputs ==
{{IO|SetAnimationTarget|Set the animation target to use. An empty string will disable the puppet.|param=string}}
{{I|SetAnimationTarget|Set the animation target to use. An empty string will disable the puppet.|param=string}}
{{I BaseNPC}}
{{I Targetname}}
{{I Parentname}}
{{I Studiomodel}}


== Outputs ==
{{O BaseNPC}}
{{O Targetname}}
{{O Studiomodel}}


[[Category:NPCs]]
[[Category:NPCs]]

Latest revision as of 05:13, 19 May 2025

C++ Class hierarchy
CNPC_Puppet
CAI_BaseNPC
CBaseCombatCharacter
CBaseFlex
CBaseAnimatingOverlay
CBaseAnimating
CBaseEntity
C++ npc_puppet.cpp

npc_puppet is a model entity available in Half-Life 2 Half-Life 2. It is a puppet entity that mimics the animations of a target NPC.

For example, place a combine soldier then an npc_puppet and edit the npc_puppet to follow the soldier and it will mimic whatever the soldier does.

Keyvalues

Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

Animation target (animationtarget) <string>
NPC entity to mimic.
Target attachment point name (attachmentname) <string>

Inputs

SetAnimationTarget <stringRedirectInput/string>
Set the animation target to use. An empty string will disable the puppet.