SetAmbientSoundScriptBoolVariable

Definition

SetAmbientSoundScriptBoolVariable(string ambientSoundName, string variable, bool value)

Description

This function sets the value of the Boolean 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 Boolean variable defined in the script attached to the ambientSoundName ambient sound.

value
Specifies the Boolean value for the variable variable.

Example

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

function Init()
    SetAmbientSoundScriptBoolVariable("sound1""a"true)
end

function Update()

end
Assuming that the variable “a” is defined in the script attached to the ambient sound object “sound1”SetAmbientSoundScriptBoolVariable function sets the  “a” variable to true.
adminSetAmbientSoundScriptBoolVariable