SetTerrainScriptStringVariable

Definition

SetTerrainScriptStringVariable(string variable, string value)

Description

This function sets the value of the String variable defined in the script attached to the terrain object.

Parameters

variable
Specifies the name of the String variable defined in the script attached to the terrain object.

value
Specifies the value of the String variable to be set.

Example

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

function Init()
    SetTerrainScriptStringVariable("a""hello")
end

function Update()

end
Assuming that the variable “a” is defined in the script attached to the terrain object, SetTerrainScriptStringVariable function sets the value of “a” to “hello”.
adminSetTerrainScriptStringVariable