Garry's Mod Wiki


  number, Entity Entity:PlayScene( string scene, number delay = 0 )


Makes the entity play a .vcd scene. All scenes from Half-Life 2.


1 string scene
Filepath to scene.
2 number delay = 0
Delay in seconds until the scene starts playing.


1 number
Estimated length of the scene.
2 Entity
The scene entity, removing which will stop the scene from continuing to play.


Makes the NPC that the player 1 is looking at play the Welcome to City 17 speech.

local entity = Entity( 1 ):GetEyeTrace().Entity if ( entity:IsValid() and entity:IsNPC() ) then entity:PlayScene( "scenes/breencast/welcome.vcd" ) end
Output: The entity plays the scene.