SetGUIButtonScriptIntVariable

Definition

SetGUIButtonScriptIntVariable(string GUIName, string buttonName, vstring variable, int value)

Description

This function sets the value of the Integer variable defined in the script attached to the buttonName button that belongs to GUIName GUI.

Parameters

GUIName
Specifies the the name of the GUI to which the buttonName button belongs.

buttonName
Specifies the the name of the button that belongs to GUIName GUI.

variable
Specifies the name of the Integer variable defined in the script attached to the buttonName button.

value
Specifies the value of variable variable to be set.

Example

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

function Init()
    SetGUIButtonScriptIntVariable("gui_pack1_button""PlayGame""a", 1)
end

function Update()

end
Assuming that the variable “a” is defined in the script attached to the button object “PlayGame” that belongs to “gui_pack1_button” GUI , SetGUIButtonScriptIntVariable function sets the value of variable “a” to 1.
adminSetGUIButtonScriptIntVariable