This article's documentation is for anything that uses the Source engine. Click here for more information.

cycler_actor

From Valve Developer Community
Revision as of 15:54, 17 May 2024 by PeeBot (talk | contribs) (Changed parameters of {{this is a}} to comply with the updated version. This action was performed by a bot.)
Jump to navigation Jump to search
English (en)Translate (Translate)
Icon-NotInFGD.png
This entity is not in the Counter-Strike: SourceDay of Defeat: SourceTeam Fortress 2Counter-Strike: Global Offensive FGD by default.
See below for instructions on making it available.

cycler_actor is a point entity available in all Source Source games except Left 4 Dead seriesLeft 4 Dead series Left 4 Dead series. It is used to display a model for testing purposes. Shooting it will cycle through the model's animations. This version of the cycler entity is used for NPC's.

C++ In code, it is represented by theCFlextalkActorclass, defined in thegenericactor.cppfile.

Flags

BaseNPC flags 
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]
Note.pngNote:This flag is disabled in Half-Life 2: Episode One Half-Life 2: Episode Two episodic for player companions, because the StartScripting input does this.
Don't drop weapons : [8192]
Ignore player push : [16384] (in all games since Source 2006)
Entity won't give way to player.

Keyvalues

Sentence Group ([todo internal name (i)]) <string>

GenericActor:

Hull type (hull_name) <choices>
Physical size of the entity. Affects navigation capabilities and the bounding box.
  • HUMAN_HULL: Human
  • WIDE_HUMAN_HULL: Wide
  • TINY_HULL: Tiny
  • MEDIUM_HULL: Medium
  • LARGE_HULL: Large

AI_BaseActor:

Don't Use Speech Semaphore (DontUseSpeechSemaphore) <boolean>
Friendly NPCs are not allowed to speak if another friendly NPC is speaking. In some cases we don't want speaking NPCs to prevent other NPCs from speaking (for instance, if there is a friendly NPC speaking for a long time on a monitor). To make this NPC not prevent other NPCs from talking, make it not grab the semaphore when it speaks.
Facial Expression Override (ExpressionOverride) <string>
Enter a VCD file to override facial expressions on this actor.

AI_BaseNPC:

Weapon Held (additionalequipment) <classname>
Gives the NPC a weapon. NPCs may attack oddly or not attack if they don't know how to use a particular weapon.
Health (health) <integer> !FGD
How close to death the NPC is.
Maximum Health (max_health) <integer> !FGD
Health cannot exceed this amount.
Squad Name (squadname) <string>
NPCs that are in the same squad will share information about enemies, and will take turns attacking and covering each other.
Target Path Corner (target) <targetname>
If set, the name of a path_corner entity that this NPC will move to, after spawning. Must be within 576 units from the NPC.
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
Todo: clarify the differences between each
Wake Radius (wakeradius) <float>
Auto-wake if player is within this distance, in Hammer units.
Wake Squad (wakesquad) <boolean>
If yes, wake all of the NPCs squadmates if the NPC is woken.
Ignore unseen enemies (ignoreunseenenemies) <boolean>
Prefer visible enemies, regardless of distance or relationship priority.
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>
If yes, limits NPC to using specified hint group for navigation requests, but does not limit local navigation.
Enemy Filter (enemyfilter) <targetname>
Filter by which to filter potential enemies.
Local Velocity (velocity) <vector> !FGD
Velocity generated by the entity, can cause strange behavior if changed.
Base Velocity (basevelocity) <vector> !FGD
Velocity to start with on spawn.
Angular Velocity (avelocity) <vector> !FGD
Angular velocity to start with on spawn.
Water Level (waterlevel) <character> !FGD
Current water level of the entity, can cause strange behavior if changed.

CBaseCombatCharacter:

Relationship (Relationship) <string> !FGD
<string|targetname or classname> <string|disposition> <int|rank>
Changes whether this entity likes or dislikes certain other things. Used like the ai_relationship entity, with this entity as the subject.
Values for disposition are:
  • D_HT: Hate
  • D_FR: Fear
  • D_LI: Like
  • D_NU: Neutral
Physics Impact Damage Scale (physdamagescale) <float>
Multiplier for damage amount when this entity is hit by a physics object. With a value of 0 the entity will take no damage from physics.
Note.pngNote:Content moved to Rendering and studio model related KIO/Keyvalues for continuation of page history


Inputs

AI_BaseActor:

SetExpressionOverride <stringRedirectInput/string>
Set facial expression override.

AI_BaseNPC:

SetRelationship <stringRedirectInput/string>
<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 <targetnameRedirectInput/string>
Set a filter by which to filter potential enemies.
SetHealth <integerRedirectInput/integer>
Set the health of the NPC to this amount.
SetSquad <stringRedirectInput/string>
Changes 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.[Clarify]
UpdateEnemyMemory <targetnameRedirectInput/string> (in all games since Half-Life 2: Episode One)
Update (or create) this NPC's memory of of the given entity.
ForgetEntity <targetnameRedirectInput/string>
Clears out the NPC's knowledge of a named entity.
IgnoreDangerSounds <floatRedirectInput/float>
Ignore danger sounds for the specified number of seconds.
Todo: Clarify what a "danger sound" is.
Break
Makes the NPC die and disappear.
StartScripting
Puts the NPC into a "scripted" state. It will ignore a variety of stimuli, such as +use, danger sounds, and idle speech.
ExitScripting
Puts the NPC into their normal state again.
GagEnable
Prevents the NPC from making any vocalized sounds or speech, unless they are in a choreographed scene.
GagDisable
Allow the NPC to make vocalizations again.
InsideTransition  !FGD
Tells the NPC to stop any choreography (but not scripted speech) its a part of. Usually this is only done by a trigger_changelevel when a player steps inside it, and the NPC is inside an associated trigger_transition.
ActivateSpeedModifier  !FGD
DisableSpeedModifier  !FGD
SetSpeedModRadius  !FGD
SetSpeedModSpeed  !FGD
HolsterWeapon
Makes the NPC put their weapon away.
UnholsterWeapon
Makes the NPC take out their weapon, if they have one.
HolsterAndDestroyWeapon
Makes the NPC holster their weapon and then never unholster it again.
ForceInteractionWithNPC <stringRedirectInput/string> (in all games since Half-Life 2: Episode One)
Force the NPC to use a dynamic interaction with another NPC. Syntax is <targetname> <dynamic interaction>.

CBaseCombatCharacter:

KilledNPC  !FGD
Tells the entity it killed something. Despite the name, this can include a player. This input will be automatically sent by the victim when they die.
physdamagescale <floatRedirectInput/float>
Scales damage energy when this character is hit by a physics object. With a value of 0 the NPC will take no damage from physics.
Note.pngNote:Content moved to Rendering and studio model related KIO/Inputs for continuation of page history


Outputs

AI_BaseNPC:

OnDamaged
Fired when this NPC takes damage.
OnDeath
Fired when this NPC is killed.
OnHalfHealth
Fired when this NPC reaches half of its maximum health.
OnFoundEnemy
Fired when this NPC establishes line of sight to its enemy.
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
Fired when this NPC establishes line of sight to an enemy player.
OnLostPlayer
Fired when this NPC loses an enemy player, usually due to the enemy being killed/removed, or because this NPC has selected a newer, more dangerous enemy.
OnFoundEnemy
Fired when this NPC establishes line of sight to an enemy player.
OnHearWorld
Fired when this NPC hears a sound (other than combat or the player).
Confirm:Must come from an ai_sound?
OnHearPlayer
Fired when this NPC hears the player.
OnHearCombat
Fired when this NPC hears combat sounds.
OnDamagedByPlayer
Fired when this NPC is hurt by a player.
OnDamagedByPlayerSquad
Fired when this NPC is hurt by anyone in the player squad.
OnDenyCommanderUse
Fired when this NPC has refused to join the player's squad.
OnWake
Fired when this NPC comes out of a sleep state.
OnSleep
Fired when this NPC enters a sleep state.
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
Fired when a forced interaction is finished as it was meant to.
Note.pngNote:Content moved to Rendering and studio model related KIO/Outputs for continuation of page history