SetCameraScriptStringVariable

Definition

SetCameraScriptStringVariable(string cameraName, string variable, string value)

Description

This function sets the value of the String variable defined in the script attached to the cameraName engine camera object to value.

Parameters

cameraName
Specifies the name of the engine camera object.

variable
Specifies the name of the String variable defined in the script attached to the cameraName engine camera.

value
Specifies the String value for the variable variable.

Example

--script name is SetCameraScriptStringVariable.lua attached a to game object such as water

function Init()
    SetCameraScriptStringVariable("camera1""a""hello")
end

function Update()

end
Assuming that the variable “a” is defined in the script attached to the engine camera object “camera1”SetCameraScriptStringVariable function sets the  “a” variable to “hello”.
adminSetCameraScriptStringVariable