Garry's Mod Wiki

Revision Difference

Entity:PlayScene#526628

<function name="PlayScene" parent="Entity" type="classfunc"> <description>Makes the entity play a .vcd scene.</description> <realm>Server</realm> <args> <arg name="scene" type="string">Filepath to scene</arg> <arg name="delay" type="number" default="0">Delay in seconds until the scene starts playing.</arg> </args> <rets> <ret name="" type="number">Estimated length of the scene</ret> </rets> </function> <example> <description>Makes the entity that the player 1 is looking at play the "Welcome to City 17" speech.</description> <code> local ent = Entity( 1 ):GetEyeTrace().Entity if( IsValid( ent ) ) then npc:PlayScene( "scenes/breencast/welcome.vcd" ) ent:PlayScene( "scenes/breencast/welcome.vcd" ) end </code> <output>The entity plays the scene.</output> </example>