Definition
SetTriggerScriptIntVariable(string triggerName, string variable, int value)
Description
This function sets the value of the Integer 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 Integer variable defined in the script attached to the trigger object triggerName.
value
Specifies the value of the Integer variable to be set.
Example
--script name is SetTriggerScriptIntVariable.lua attached a to game object such as water function Init() SetTriggerScriptIntVariable("trigger1", "a", 1) end function Update() end
Assuming that the variable “a” is defined in the script attached to the trigger object “trigger1”, SetTriggerScriptIntVariable function sets the value of “a” to 1.
SetTriggerScriptIntVariable