cycler_actor

From Valve Developer Community
Jump to navigation Jump to search
English (en)Translate (Translate)
Icon-callout-not-in-fgd.png
This entity is not in the FGD by default, except in Half-Life 2.
See below for instructions on making it available.
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.

Controlling 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>
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>
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]

Inputs

Alpha <integerRedirectInput/integer>
Sets the Alpha Value.

FGD Code

@PointClass base(BaseNPC, RenderFields, Shadow) studio() = cycler_actor : "Actor Cycler"
[
	model(studio) : "Model"
	Sentence(string) : "Sentence Group" : ""

	input Alpha(integer) : "Set Alpha Value"
]

See Also