PlayAll3DSounds([optional] string exception_1, [optional] string exception_2,..., [optional] string exception_n)
This function plays all 3D sounds except for the 3D sounds sent to the function. If the loop state of each 3D sound is true, the sound will be played continuously, otherwise it will be played only once.
[optional] string exception_1, [optional] string exception_2,…, [optional] string exception_n
Specifies the name of the 3D sounds that should not be played by this function. If no name is passed to PlayAll3DSounds function, all 3D sounds that will be played.
function OnTriggerEnter(otherActorName) --nil means main character controller if otherActorName == nil then PlayAll3DSounds("sound3D_2", "sound3D_3") 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 3D sounds except the 3D sounds “sound3D_2” and “sound3D_3” will be played.PlayAll3DSounds