PlaySoundLoop

Definition

PlaySoundLoop(string soundObjectName1, string soundObjectName2, ..., string soundObjectNameN)

Description

This function plays ambient and 3D sounds soundObjectName1, soundObjectName2, ,  soundObjectNameN continuously.

Parameters

soundObjectName1, soundObjectName2, , soundObjectNameN
Specify the name of the ambient and 3D sounds that should be played continuously by this function. You can also use the name “this” for soundObjectName[N]. In this case, “this” refers to the ambient or 3D sound that this script is attached to.

Example

function Init()
    PlaySoundLoop("this""river")
end

function Update()

end
Assume that the above script is attached to an ambient sound named “ambient1”. Also, “river” in the example above is the name of a 3D sound. In our example, PlaySoundLoop function plays the current sound (which has a name equivalent to “ambient1”), and the 3D sound “river” continuously.
adminPlaySoundLoop