PauseAllUpdateEvents

Definition

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

Description

This function pauses the script’s Update() event of all game objects except the script’s Update() event of objects passed to the function.

Parameters

[optional] string exception_1, [optional] string exception_2,, [optional] string exception_n
Specifies the name of the objects whose script’s Update() event should not be paused by this function. If no name is passed to the function, Update() events of all game object scripts will be paused.

Example

function OnTriggerEnter(otherActorName)
    --nil means main character controller
    if otherActorName == nil then
          PauseAllUpdateEvents("water1""sound1")
    end
end

function OnTriggerStay(otherActorName)

end

function OnTriggerExit(otherActorName)

end
Assume that the above script is attached to a trigger named trigger1. Also assume that “water1” and “sound1” in the example above are the name of water and sound objects in the VScene, respectively.
Whenever the main character enters “trigger1”, script’s Update() event of all game objects except  script’s Update() event of “water1” and “sound1” objects will be paused.
adminPauseAllUpdateEvents