GetCameraScriptBoolVariable

Definition

bool GetCameraScriptBoolVariable(string cameraName, string variable)

Description

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

Parameters

cameraName
Specifies the name of the engine camera object.

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

Return Value

Returns the value of the Boolean variable defined in the script attached to the cameraName engine camera object.

Example

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

value = false

function Init()
    value = GetCameraScriptBoolVariable("camera1""a")
end

function Update()

end
Assuming that the variable “a” is defined with the value true in the script attached to the engine camera object “camera1”GetCameraScriptBoolVariable function returns the value true.
adminGetCameraScriptBoolVariable