CSceneEntity

From Source Entities
(Redirected from Scripted scene)
Jump to navigation Jump to search

Code classes:

Choreo scene.png

CSceneEntity is a code class in every Source game.

Classnames:

  • logic_choreographed_scene - Manages a choreographed scene of one or more actors. This entity handles the vast majority of dialogue in Hl2.pngP1.pngP2.png.
  • scripted_scene (Not in FGD) - Unused classname. No reason to use it.

Keyvalues[edit | edit source]

Scene file (SceneFile) <scene>
The VCD file to use.
Post-interruption scene (Not in FGD) (ResumeSceneFile) <scene>
If this entity's scene was interrupted and we plan on going back to it, tells actors to play this scene instead.
Target 1 (target1) to Target 8 (target8) <target_destination>
Targetnames of actors which will take part in this scene. These should match with names defined in the VCD.
If an Actor is talking... (busyactor) <choices>
What to do if an actor this scene needs is already talking when this scene is told to start.
  • 0: Start immediately (Unnatural.)
  • 1: Wait for actor to finish
  • 2: Interrupt at next interrupt event - Actor waits until they're at an appropriate point to quit speaking to play this scene, then goes back to their previous one.
  • 3: Cancel at next interrupt event - Actor waits until they're at an appropriate point to quit speaking to play this scene, then forgets about their previous one.
On player death (onplayerdeath) <choices>
What should our actors do if the player dies?
  • 0: Do Nothing
  • 1: Cancel Script and return to AI

Inputs[edit | edit source]

Start
Starts playback of the scene file.
Pause
Pauses playback of the scene file.
Resume
Resumes playback of the scene if it was paused.
Cancel
Cancels playback of the scene.
CancelAtNextInterrupt
Cancels playback of the scene at the next interrupt event in the scene.
PitchShift <float>
Multiplies the pitch of all speech involved in the scene.
InterjectResponse <string>
If available, tells a random actor currently not talking to speak a concept. This input is used in Hl2.pngd1_trainstation_05 when the player drops certain objects on the floor.
StopWaitingForActor
If not currently playing a scene, tells the entity to stop waiting on an actor to stop talking. To do: What exactly is this used for?
Trigger (Not in FGD) <int>
Makes the associated OnTrigger output fire.
SetTarget1 to SetTarget4 <target_destination> (available in all games since P2.png)
Sets the associated Target (x) keyvalue.

Outputs[edit | edit source]

OnStart
Fires when the scene has successfully begun playing.
OnCompletion
Fires when the scene is finished.
OnCanceled
Fires when the scene is cancelled.
OnTrigger1 to OnTrigger16
Fired when the associated FireTrigger event is reached in the VCD.

See Also[edit | edit source]