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

Cycler actor: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(Distinguish cycler_actor from generic_actor.)
 
Line 3: Line 3:
{{stub}}
{{stub}}
{{CD|CFlextalkActor|base=CGenericActor|file1=genericactor.cpp}}
{{CD|CFlextalkActor|base=CGenericActor|file1=genericactor.cpp}}
{{This is a|model entity|name=cycler_actor|except=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 {{ent|cycler}} entity is used for NPCs.
{{This is a|model entity|name=cycler_actor|except=Left 4 Dead series}} It inherits from {{ent|generic_actor}} and is identical to each other. This NPC is made for testing the model's facial expressions. The actor's flex controllers can be manipulated via <code>flex_expression</code> and <code>flex_talk</code> [[List_of_Half-Life_2_console_commands_and_variables|ConVars]].  
{{warning|Most actors simply die after being shot.}}
{{warning|Most actors simply die after being shot.}}
== Conntrolling cycler_actor ==
<code>flex_expression</code> is parsed by the actor code to set flex (facial) targets.
* <code>flex_expression -</code> clears all flex targets (neutral face).
* <code>flex_expression ?</code> prints a list of available flex controller names to the console.
* <code>flex_expression <name></code> sets the flex controller named <name> to target=1.0 (e.g. flex_expression smile).
* <code>flex_expression +N</code> applies a predefined expression preset (if the model/engine provides them).
<code>flex_talk</code> is a small command switch used by the actor to trigger various talking/eye-look behaviors:
* <code>flex_talk -1 </code>→ force the actor to attempt to play one sentence (uses the Sentence key + an internal counter). After firing it resets to 0. e.g.
<source lang=c>
] ent_create cycler_actor model models/alyx.mdl sentence METROPOLICE_BACK_UP_A
] flex_talk -1
578 : METROPOLICE_BACK_UP_A0
] flex_talk -1
579 : METROPOLICE_BACK_UP_A1
] flex_talk -1
580 : METROPOLICE_BACK_UP_A2
</source>
* <code>flex_talk -2 </code>→ push the actor’s next eye-look far into the future (effectively prevents immediate eye-look).
* <code>flex_talk -3 </code>→ make the actor’s eye-look happen immediately.
* <code>flex_talk -4 </code>→ Add the player as a look target (actor will look at player).
* <code>flex_talk -5 </code>→ Force a chosen look target pick.
* <code>flex_talk 0 </code>→ normal / idle behavior (nothing forced).


== Keyvalues ==
== Keyvalues ==
Line 18: Line 51:
* {{ent|cycler_weapon}}
* {{ent|cycler_weapon}}
* {{ent|cycler_wreckage}}
* {{ent|cycler_wreckage}}
* {{ent|generic_actor}}

Latest revision as of 06:49, 20 October 2025

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.

Stub

This article or section is a stub. You can help by expanding it.

C++ Class hierarchy
CFlextalkActor
CGenericActor
CAI_BaseActor
CAI_ExpresserHost
CAI_BaseHumanoid
CAI_BaseHumanoidBase
CAI_BaseNPC
CBaseCombatCharacter
CBaseFlex
CBaseAnimatingOverlay
CBaseAnimating
CBaseEntity
C++ genericactor.cpp

cycler_actor is a model entity available in all Source Source games except Left 4 Dead seriesLeft 4 Dead series Left 4 Dead series. It inherits from generic_actor and is identical to each other. This NPC is made for testing the model's facial expressions. The actor's flex controllers can be manipulated via flex_expression and flex_talk ConVars.

Warning.pngWarning:Most actors simply die after being shot.

Conntrolling cycler_actor

flex_expression is parsed by the actor code to set flex (facial) targets.

  • flex_expression - clears all flex targets (neutral face).
  • flex_expression ? prints a list of available flex controller names to the console.
  • flex_expression <name> sets the flex controller named <name> to target=1.0 (e.g. flex_expression smile).
  • flex_expression +N applies a predefined expression preset (if the model/engine provides them).


flex_talk is a small command switch used by the actor to trigger various talking/eye-look behaviors:

  • flex_talk -1 → force the actor to attempt to play one sentence (uses the Sentence key + an internal counter). After firing it resets to 0. e.g.
] ent_create cycler_actor model models/alyx.mdl sentence METROPOLICE_BACK_UP_A
] flex_talk -1
578 : METROPOLICE_BACK_UP_A0
] flex_talk -1
579 : METROPOLICE_BACK_UP_A1
] flex_talk -1
580 : METROPOLICE_BACK_UP_A2
  • flex_talk -2 → push the actor’s next eye-look far into the future (effectively prevents immediate eye-look).
  • flex_talk -3 → make the actor’s eye-look happen immediately.
  • flex_talk -4 → Add the player as a look target (actor will look at player).
  • flex_talk -5 → Force a chosen look target pick.
  • flex_talk 0 → normal / idle behavior (nothing forced).

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

World Model (model) <model path>[ Edit ]
In-game 3D representation of the entity to display. This is the path to a MDL relative to the game's root directory. (128 character limit)

Sentence Group (Sentence) <string>
[Todo]


See Also