Definition
SetAmbientSoundScriptStringVariable(string ambientSoundName, string variable, string value)
Description
This function sets the value of the String 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 String variable defined in the script attached to the ambientSoundName ambient sound.
value
Specifies the String value for the variable variable.
Example
--script name is SetAmbientSoundScriptStringVariable.lua attached a to game object such as water function Init() SetAmbientSoundScriptStringVariable("sound1", "a", "hello") end function Update() end
Assuming that the variable “a” is defined in the script attached to the ambient sound object “sound1”, SetAmbientSoundScriptStringVariable function sets the “a” variable to “hello”.
SetAmbientSoundScriptStringVariable