PlayAllPausedResourceSounds

Definition

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

Description

This function plays all paused resource sounds except for the paused resource sounds sent to the function. If the loop state of each resource sound is true (For example, if it is played by the PlayResourceSoundsLoop function and then paused by the PauseResourceSound function), the paused resource sound will be played continuously, otherwise it will be played only once.

Parameters

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

Example

function OnTriggerEnter(otherActorName)
    --nil means main character controller
    if otherActorName == nil then
          LoadResource("Sounds""fire.ogg")
          LoadResource("Sounds""river.ogg")
          LoadResource("Sounds""ambient.ogg")
          PlayAllResourceSoundsLoop()
    end
end

function OnTriggerStay(otherActorName)
    --nil means main character controller
    if otherActorName == nil then
          PauseAllResourceSounds()
    end
end

function OnTriggerExit(otherActorName)
    if otherActorName == nil then
          PlayAllPausedResourceSounds("Sounds_fire.ogg""Sounds_river.ogg")
    end
end
Assume that the above script is attached to a trigger named trigger1.
Whenever the main character enters “trigger1”, we load and play 3 resource sounds — In order for LoadResource function to load the desired resource, you must first add it through the Add Resource to Current Project dialog (File > Project > Add/Remove Resource to/from Current Project). When the main character stays in the trigger, all the resource sounds that are playing will be paused. When the main character exits “trigger1”, all the paused resource sounds except the resource sounds “fire.ogg” and “river.ogg” will be played.
adminPlayAllPausedResourceSounds