Definition
PauseWaterAnimation(string waterObjectName)
Description
This function pauses 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 name 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) 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.
Example 2
--Name of script is PauseWaterAnimation2.lua function Init() PauseWaterAnimation("this") end function Update() end
Assume that the above script named PauseWaterAnimation2.lua is attached to a water object named “water1”. In this case, string “this” in the PauseWaterAnimation function will be equal to “water1”. In our example, the function PauseWaterAnimation pauses animation of current water, which is “water1”.
PauseWaterAnimation