Definition
PauseUpdateEventOf3DSound(string 3DSoundName)
Description
This function pauses the script’s Update() event of 3D sound 3DSoundName.
Parameters
3DSoundName
Specifies the name of the 3D sound. You can also use the name “this” for this parameter. In this case, “this” refers to the 3D sound name that this script is attached to.
Example 1
function OnTriggerEnter(otherActorName) --nil means main character controller if otherActorName == nil then PauseUpdateEventOf3DSound("river1") 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 character enters “trigger1”, script’s Update() event of 3D sound “river1” will be paused.
Example 2
--Name of script is pauseupdateeventof3dsound2.lua function Init() PauseUpdateEventOf3DSound("this") end function Update() end
Assume that the above script named pauseupdateeventof3dsound2.lua is attached to a 3D sound object named “sound1”. In this case, string “this” in the PauseUpdateEventOf3DSound function will be equal to “sound1”. In our example, the function PauseUpdateEventOf3DSound pauses the script’s Update() event of current 3D sound, which is “sound1”.
PauseUpdateEventOf3DSound