Definition
SetAmbientSoundScriptIntVariable(string ambientSoundName, string variable, int value)
Description
This function sets the value of the Integer variable defined in the script attached to the ambientSoundName ambient sound object to value.
Parameters
ambientSoundName
Specifies the name of the ambient sound object.
variable
Specifies the name of the Integer variable defined in the script attached to the ambientSoundName ambient sound.
value
Specifies the Integer value for the variable variable.
Example
--script name is SetAmbientSoundScriptIntVariable.lua attached a to game object such as water function Init() SetAmbientSoundScriptIntVariable("sound1", "a", 1) end function Update() end
Assuming that the variable “a” is defined in the script attached to the ambient sound object “sound1”, SetAmbientSoundScriptIntVariable function sets the “a” variable to 1.
SetAmbientSoundScriptIntVariable