ResumeWaterAnimation

Definition

ResumeWaterAnimation(string waterObjectName)

Description

This function resumes animation of water waterObjectName.

Parameters

waterObjectName
Specifies the name of the water. You can also use the name “this” for this parameter. In this case, “this” refers to the water that this script is attached to.

Example 1

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

function OnTriggerStay(otherActorName)

end

function OnTriggerExit(otherActorName)
    --nil means main character controller
    if otherActorName == nil then
          ResumeWaterAnimation("water1")
    end
end
Assume that the above script is attached to a trigger named “trigger1”. Whenever the main character enters “trigger1”, animation of water “water1” will be paused. Whenever the main character exits “trigger1”, animation of water “water1” will be resumed.

Example 2

--Name of script is ResumeWaterAnimation2.lua

function Init()
    PauseWaterAnimation("this")

    ResumeWaterAnimation("this")
end

function Update()

end
Assume that the above script named ResumeWaterAnimation2.lua is attached to a water object named “water1”. In this case, string “this”  in the ResumeWaterAnimation function will be equal to “water1”. In our example, we use PauseWaterAnimation function to pause animation of current water, which is “water1”. Then we use ResumeWaterAnimation function to resume animation of current water, which is “water1”.
adminResumeWaterAnimation