Garry's Mod Wiki

Entity:PlayScene

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

Description

Makes the entity play a .vcd scene.

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 entity that the player 1 is looking at play the "Welcome to City 17" speech.

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

Page Links


Special Pages


Wikis

?

Render Time: 37ms

DB GetPage 4
Generate Html 6
SaveChanges (1) 19
Render Body 0
Render Sidebar 6