Ghost speaker

From Valve Developer Community
Jump to navigation Jump to search

This is a point entity available in Half-Life: Alyx Half-Life: Alyx and Counter-Strike 2 Counter-Strike 2.

A meshless model you can use as a speaker location for VCDs. VCDs can be played through logic_choreographed_scene.

Keyvalues

Model (model) <model path>
The model this entity should appear as.
Has Animated Face (has_animated_face) <choices>
Does this entity have an animated face?
  • 0: No
  • 1: Yes
Furniture Physics (furniture_physics) <boolean>
Create (kinematic) physics for the furniture. (By default npc_furniture is nonsolid to avoid unintentional interactions with any co-actors.)
Lighting Origin (lightingorigin) <targetname>
Select an entity to specify a location to sample lighting from, instead of using this entity's origin.)

DamageFilter:

Damage Filter (damagefilter) <targetname>
Name of the filter_damage_type entity that controls which entities can damage us.
Source 2 BaseNPC
Target Path Corner (target) <targetname>
If set, the name of a path_corner entity that this NPC will walk to, after spawning.
Squad Name (squadname) <string>
NPCs that are in the same squad (i.e., have matching squad names) will share information about enemies and will take turns attacking and covering each other.
Hint Group (hintgroup) <string>
Hint groups are used by NPCs to restrict their hint-node searching to a subset of the map's hint nodes. Only hint nodes with matching hint group names will be considered by this NPC.
Hint Limit Nav (hintlimiting) <boolean>
Limits NPC to using specified hint group for navigation requests. Does not limit local navigation.
If a Hint Group is specified, whether to also allow the use of generic nodes. (allowgenericnodes) <boolean>
Initial Idle Activity (initialidle) <string> Obsolete
Leftover in FGD.
Activity the NPC should use to idle until becomes alert
Sleep State (sleepstate) <choices>
Holds the NPC in stasis until specified condition. See also Wake Radius and Wake Squad.
  • 0: None
  • 1: Waiting for threat
  • 2: Waiting for PVS
  • 3: Waiting for input, ignore PVS
  • 4: Auto PVS
  • 5: Auto PVS after PVS
Wake Radius (wakeradius) <float>
Auto-wake if player comes within this distance.
Wake Squad (wakesquad) <boolean>
Wake all of the NPCs squadmates if the NPC is woken.
Enemy Filter (enemyfilter) <targetname>
Filter by which to filter potential enemies
Ignore unseen enemies (ignoreunseenenemies) <boolean>
Prefers visible enemies, regardless of distance or relationship priority.
Physics Impact Damage Scale (physdamagescale) <float>
Scales damage energy when this object is hit by a physics object. With a value of 0 the NPC will take no damage from physics.
Nav Restriction Volume (NavRestrictionVolume) <targetname>
Markup volume entity to restrict unit navigation
Spawn as Temp Ragdoll (spawnasragdoll) <choices>
Specifies if the NPC will spawn as a temporary ragdoll and the behavior after becoming a ragdoll.
  • 0: Disabled
  • 1: Ragdoll and get up when settled
  • 2: Ragdoll and remain ragdoll
Use Alt NPC Avoidance (UseAltNpcAvoid) <choices>
Specifies if the NPC should be using any algorithm variants when avoiding other NPCs.
  • 0: Disabled
  • 1: Alt 1
Preview Animation (DefaultAnim) <sequence>
Name of an animation to preview in Hammer, does not do anything in game.
Source 2 Targetname
Name (targetname) <string>
The targetname that other entities refer to this entity by.
Entity Scripts (vscripts) <scriptlist>
Space delimited list of VScript files (without file extension) that are executed after all entities have spawned. The scripts are all executed in the same script scope, later ones overwriting any identical variables and functions.
Create Client-Only Entity (clientSideEntity) <choices>
Source 2 Hierarchy
Parent (parentname) <targetname>
Specifies a movement parent. An entity will maintain its initial offset from its parent.
Parent Model Bone/Attachment Name (parentAttachmentName) <string>
The name of the bone or attachment to attach to on the entity's parent in the movement hierarchy. Use !bonemerge to use bone-merge style attachment.
Model Attachment position offset (local.origin) <coordinates>
Offset in the local space of the parent model's attachment/bone to use in hierarchy. Not used if you are not using parent attachment.
Model Attachment angular offset (local.angles) <angles>
Angular offset in the local space of the parent model's attachment/bone to use in hierarchy. Not used if you are not using parent attachment.
Model Attachment scale (local.scales) <vector>
Scale in the local space of the parent model's attachment/bone to use in hierarchy. Not used if you are not using parent attachment.
Use Model Attachment Offset (useLocalOffset) <boolean>
Whether to respect the specified local offset when doing the initial hierarchical attachment to its parent.

Flags

Source 2 BaseNPC
Wait Till Seen : [1]
Prevents this NPC from seeing (or being seen) until it enters a player's viewcone.
Gag : [2]
Won't make IDLE sounds until it's angry.
Fall to ground (unchecked means teleport to ground) : [4]
Drop Healthkit : [8]
Causes this NPC to drop an item_healthvial upon dying.
Efficient : [16]
Don't acquire enemies or avoid obstacles
Wait For Script : [128]
Forces this NPC to "wait" in an idle state until it finishes playing a scripted_sequence.
Long Visibility/Shoot : [256]
By default, increases a NPC's sight range to 6,000 units and allows it to attack from anywhere within that distance.
Fade Corpse : [512]
Think outside PVS : [1024]
Allows this NPC to run its regular AI outside of any player's PVS.
Template NPC : [2048]
Marks this NPC as a template for entities like npc_template_maker. The NPC will not spawn on its own. This is not needed for point_template.
Do Alternate collision for this NPC (player avoidance) : [4096]
Don't drop weapons : [8192]
Ignore player push : [16384]
Entity won't give way to player.

Inputs

DisablePlayerCollision
Disable collisions against the player.
EnablePlayerCollision
Enable collisions against the player.
Source 2 BaseNPC
OverrideHealth <integerRedirectInput/integer>
SetRelationship <string|targetname or classname> <string|disposition> <int|rank>
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
  • D_FR: Fear
  • D_LI: Like
  • D_NU: Neutral
SetEnemyFilter <stringRedirectInput/string>
Changes this NPC's enemy filter to the named filter
SetHealth <integerRedirectInput/integer>
Set the NPC's health.
SetBodyGroup <stringRedirectInput/string>
ets NPC bodygroup. Format is <BodygroupName,index>
physdamagescale <floatRedirectInput/float>
Sets the value that scales damage energy when this character is hit by a physics object. NOTE: 0 means this feature is disabled for backwards compatibility.
Ignite
Ignite, burst into flames
IgniteLifetime <floatRedirectInput/float>
Ignite, with a parameter lifetime.
IgniteNumHitboxFires <integerRedirectInput/integer>
Ignite, with a parameter number of hitbox fires.
IgniteHitboxFireScale <floatRedirectInput/float>
Ignite, with a parameter hitbox fire scale.
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.
SetSquad <stringRedirectInput/string>
Change 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 <targetnameRedirectInput/string>
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 <floatRedirectInput/float>
Ignore danger sounds for the specified number of seconds.
HolsterWeapon
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
Identical to HolsterWeapon, except the weapon is destroyed once it has been holstered and concealed.
UnholsterWeapon
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> <string>
Force the NPC to use a dynamic interaction with another NPC. Parameter format: <target NPC name> <dynamic interaction name>
UpdateEnemyMemory
Update (or Create) this NPC's memory of an enemy and its location
BecomeRagdoll
This NPC will instantly become a ragdoll with ZERO force (just go limp). OnDeath, OnHalfHealth, etc. Outputs will **NOT** BE FIRED.
BecomeTemporaryRagdoll <floatRedirectInput/float>
Become a temporary ragdoll that then can be later unrgadolled.
StopTemporaryRagdoll
Rise from your grave.
StopTemporaryRagdollAndSetEnemy <stringRedirectInput/string>
Rise from your grave to attack an enemy. Animgraph NPCs will turn to face the enemy during their unragdoll. Parameter is the enemy, usually the !activator on the trigger that's firing this input.
WalkTowardsTarget <targetnameRedirectInput/string>
Walks towards a target.
StartResilientPathFollow <stringRedirectInput/string>
Walks towards the specified path corner. Will resiliently restart the walk if it's interrupted for any reason.
SetAnimGraphParameter <stringRedirectInput/string>
SetEasingParameter <stringRedirectInput/string>
EnableTeleportBuffer
Enable the teleport buffer around this NPC, if it's been disabled previously.
DisableTeleportBuffer
Disable the teleport buffer around this NPC.
EnableChoreoPhysProxy
Enable the phys proxy.
DisableChoreoPhysProxy
Disable the phys proxy.
Source 2 Targetname
Kill
Removes this entity from the world.
KillHierarchy
Removes this entity and all its children from the world.
Note.pngNote: Entities already remove orphaned children upon being removed, but this input removes all children on the same frame, being marginally faster than Kill.
AddOutput <stringRedirectInput/string>
Evaluates a keyvalue/output on this entity. It can be potentially very dangerous, use with care.
KV Format: <key> <value>
I/O Format: <output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire, -1 means infinite>
FireUser1 to FireUser4
Fire the OnUser outputs; see User Inputs and Outputs.
RunScriptFile <stringRedirectInput/string>
Execute a VScript file from disk, without file extension. The script contents are merged with the script scope of the receiving entity.
RunScriptCode <stringRedirectInput/string>
Execute a string of VScript source code in the scope of the entity receiving the input. String quotation may be needed when fired via console.
CallScriptFunction <stringRedirectInput/string>
Execute a VScript function in the scope of the receiving entity.
CallPrivateScriptFunction <stringRedirectInput/string>
Calls a script function from this entity's private script scope.
CallGlobalScriptFunction <stringRedirectInput/string>
Calls a script function in the global script scope.
Source 2 Hierarchy
SetParent <stringRedirectInput/string>
Changes the entity's parent in the movement hierarchy.
SetParentAttachment <stringRedirectInput/string>
Change this entity to attach to a specific attachment point on its parent. Entities must be parented before being sent this input. The parameter passed in should be the name of the attachment.
SetParentAttachmentMaintainOffset <stringRedirectInput/string>
Change this entity to attach to a specific attachment point on it's parent. Entities must be parented before being sent this input. The parameter passed in should be the name of the attachment. The entity will maintain it's position relative to the parent at the time it is attached.
ClearParent
Removes this entity from the the movement hierarchy, leaving it free to move independently.

Outputs

Source 2 BaseNPC
OnDamaged
!activator = damage inflictor.
!caller = this entity
Fired when this NPC takes damage.
OnDamagedByPlayer
!activator = attacker or vehicle driver [if friendly fire].
!caller = this entity
Fired when this NPC is hurt by a player.
OnDamagedByPlayerSquad
!activator = attacker or vehicle driver [if friendly fire].
!caller = this entity
Fired when this NPC is hurt by a player OR by one of the player's squadmates.
OnDeath
!activator = killer.
!caller = this entity
Fired when this NPC is killed.
OnDenyCommanderUse
Fired when this NPC has refused to join the player's squad.
OnForcedInteractionStarted
Fired when the NPC starts a forced interaction.
OnForcedInteractionAborted
Fired when the NPC aborts a forced interaction for some reason (target NPC died, couldn't be pathed to, etc)
OnForcedInteractionFinished
NPCs in actbusies can no longer perform dynamic interactions.
OnHalfHealth
Fired when this NPC reaches half of its maximum health.
OnHearCombat
Fired when this NPC hears combat sounds.
OnHearPlayer
Fired when this NPC hears the player.
OnHearWorld
Fired when this NPC hears a sound (other than combat or the player).
OnFoundEnemy <targetname*RedirectOutput/ehandle>
Fired when this NPC establishes line of sight to its enemy (outputs entity).
OnLostEnemy
Fired when this NPC loses its enemy. Usually due to the enemy being killed/removed, or because this NPC has selected a newer, more dangerous enemy.
OnLostEnemyLOS
Fired when this NPC loses line of sight to its enemy.
OnFoundPlayer <targetname*RedirectOutput/ehandle>
Fired when this NPC establishes line of sight to its enemy, and that enemy is a player (outputs player entity).
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 a newer, more dangerous enemy.
OnLostPlayerLOS
Fired when this NPC loses line of sight to its enemy, and that enemy is a player.
OnSleep
Fired when this NPC enters a sleep state.
OnWake
Fired when this NPC comes out of a sleep state.
OnUnragdollFinished
This NPC just finished getting up after being a ragdoll.
Source 2 Targetname
OnUser1 to OnUser4
These Outputs each fire in response to the firing of the like-numbered FireUser1 to FireUser4 Input; see User Inputs and Outputs.
OnKilled
This Output fires when the entity is killed and removed from the game.

See also