SetTriggerScriptStringVariable

Definition

SetTriggerScriptStringVariable(string triggerName, string variable, string value)

Description

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

Parameters

triggerName
Specifies the name of the trigger object.

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

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

Example

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

function Init()
    SetTriggerScriptStringVariable("trigger1""a""hello")
end

function Update()

end
Assuming that the variable “a” is defined in the script attached to the trigger object “trigger1”SetTriggerScriptStringVariable function sets the value of “a” to “hello”.
adminSetTriggerScriptStringVariable