Definition
int GetGUIButtonScriptIntVariable(string GUIName, string buttonName, string variable)
Description
This function gets 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.
Return Value
Returns the value of the Integer variable defined in the script attached to the buttonName button that belongs to GUIName GUI.
Example
--script name is GetGUIButtonScriptIntVariable.lua attached a to game object such as water value = 0 function Init() value = GetGUIButtonScriptIntVariable("gui_pack1_button", "PlayGame", "a") end function Update() end
Assuming that the variable “a” is defined with the value 1 in the script attached to the button object “PlayGame” that belongs to “gui_pack1_button” GUI , GetGUIButtonScriptIntVariable function returns the value 1.
GetGUIButtonScriptIntVariable