GetMainCharacterScriptBoolVariable

Definition

bool GetMainCharacterScriptBoolVariable(string variable)

Description

This function gets the value of the Boolean variable defined in the script attached to the main character object.

Parameters

variable
Specifies the name of the Boolean variable defined in the script attached to the main character.

Return Value

Returns the value of the Boolean variable defined in the script attached to the main character object.

Example

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

value = false

function Init()
    value = GetMainCharacterScriptBoolVariable("a")
end

function Update()

end
Assuming that the variable “a” is defined with the value true in the script attached to the main character object, GetMainCharacterScriptBoolVariable function returns the value true.
adminGetMainCharacterScriptBoolVariable