Definition
PlayVideoLoop(string videoName)
Description
This function plays video videoName continuously.
Parameters
videoName
Specifies the name of the video object. You can also use the name “this” for this parameter. In this case, “this” refers to the video object that this script is attached to.
Example 1
--Name of script is PlayVideoLoop1.lua function Init() PlayVideoLoop("this") end function Update() end
In this case, “this” string in the PlayVideoLoop points to the video that PlayvideoLoop1.lua script is attached to. For example, if PlayVideoLoop1.lua script is attached to a video object named “video1”, “this” will be equivalent to the name “video1”. In our example, PlayVideoLoop function plays the current video object, which is “video1”, continuously.
Example 2
function OnTriggerEnter(otherActorName) PlayVideoLoop("video1") 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 or a prefab instance that has dynamic physics enters “trigger1”, video “video1” will be played continuously.
PlayVideoLoop