Set3DSoundScriptStringVariable

Definition

Set3DSoundScriptStringVariable(string 3DSoundName, string variable, string value)

Description

This function sets the value of the String variable defined in the script attached to the 3DSoundName 3D sound object to value.

Parameters

3DSoundName
Specifies the name of the 3D sound object.

variable
Specifies the name of the String variable defined in the script attached to the 3DSoundName 3D sound.

value
Specifies the String value for the variable variable.

Example

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

function Init()
    Set3DSoundScriptStringVariable("sound1""a""hello")
end

function Update()

end
Assuming that the variable “a” is defined in the script attached to the 3D sound object “sound1”Set3DSoundScriptStringVariable function sets the  “a” variable to “hello”.
adminSet3DSoundScriptStringVariable