Garry's Mod Wiki

Revision Difference

Entity:PlayScene#526728

<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> <ret name="" type="number">Estimated length of the scene</ret> <ret name="" type="Entity">The scene entity, removing which will stop the scene from continuing to play.</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 ent:PlayScene( "scenes/breencast/welcome.vcd" ) end </code> <output>The entity plays the scene.</output> </example>