Get3DSoundScriptDoubleVariable

Definition

double Get3DSoundScriptDoubleVariable(string 3DSoundName, string variable)

Description

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

Parameters

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

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

Return Value

Returns the value of the Double variable defined in the script attached to the 3DSoundName 3D sound object.

Example

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

return_value = 0.0

function Init()
    return_value = Get3DSoundScriptDoubleVariable("sound1""a")
end

function Update()

end
Assuming that the variable “a” is defined with the value 1.0 in the script attached to the 3D sound object “sound1”, Get3DSoundScriptDoubleVariable function returns the value 1.0.
adminGet3DSoundScriptDoubleVariable