Garry's Mod Wiki

Entity:PlayScene

Entity:PlayScene

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

Description

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

Arguments

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

Returns

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

Example

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.

Special Pages


Wikis

?

Render Time: 55ms

DB GetPage 35
Generate Html 5
SaveChanges (1) 6
Render Body 0
Render Sidebar 6