Garry's Mod Wiki

Entity:StartLoopingSound

  number Entity:StartLoopingSound( string sound )

Description

Starts a "looping" sound. As with any other sound playing methods, this function expects the sound file to be looping itself and will not automatically loop a non looping sound file as one might expect.

This function is almost identical to CreateSound, with the exception of the sound being created in the STATIC channel and with normal attenuation.

See also Entity:StopLoopingSound

Arguments

1 string sound
Sound to play. Can be either a sound script or a filepath.

Returns

1 number
The ID number of started sound starting with 0, or -1 if we failed for some reason.