PauseAllAmbientSounds

Definition

PauseAllAmbientSounds([optional] string exception_1, [optional] string exception_2,..., [optional] string exception_n)

Description

This function pauses all ambient sounds that are being played except for the ambient sounds sent to the function.

Parameters

[optional] string exception_1, [optional] string exception_2,, [optional] string exception_n
Specifies the name of the ambient sounds that should not be paused by this function. If no name is passed to PauseAllAmbientSounds function, all ambient sounds that are being played will be paused.

Example

function OnTriggerEnter(otherActorName)
    --nil means main character controller
    if otherActorName == nil then
          PauseAllAmbientSounds("ambient2""ambient3")
    end
end

function OnTriggerStay(otherActorName)

end

function OnTriggerExit(otherActorName)

end
Assume that the above script is attached to a trigger named trigger1. Whenever the main game character enters “trigger1”, all the ambient sounds that are playing except the ambient sounds “ambient2” and “ambient3” will be paused.
adminPauseAllAmbientSounds