Menu
Lumberyard
Developer Guide (Version 1.12)

ScriptBind_Sound

CryLua is deprecated and will be removed in a future version of Lumberyard.

Lists C++ sound functions that can be called from Lua scripts.

GetAudioEnvironmentID

Get the audio environment TAudioEnvironmentID (wrapped into a ScriptHandle).

Syntax

Copy
Sound.GetAudioEnvironmentID(const char* const sEnvironmentName)

Returns: ScriptHandle with the TAudioEnvironmentID value, or nil if the sEnvironmentName is not found.

Parameter Description
sEnvironmentName The unique name of an audio environment.

GetAudioRtpcID

Get the RTPC TAudioControlID (wrapped into a ScriptHandle).

Syntax

Copy
Sound.GetAudioRtpcID(const char* const sRtpcName)

Returns: ScriptHandle with the TAudioControlID value, or nil if the sRtpcName is not found.

Parameter Description
sRtpcName The unique name of an audio RTPC.

GetAudioSwitchID

Get the switch TAudioControlID (wrapped into a ScriptHandle).

Syntax

Copy
Sound.GetAudioSwitchID(const char* const sSwitchName)

Returns: ScriptHandle with the TAudioControlID value, or nil if the sSwitchName is not found.

Parameter Description
sSwitchName The unique name of an audio switch.

GetAudioSwitchStateID

Get the SwitchState TAudioSwitchStatelID (wrapped into a ScriptHandle).

Syntax

Copy
Sound.GetAudioSwitchStateID(const ScriptHandle hSwitchID, const char* const sSwitchStateName)

Returns: ScriptHandle with the TAudioSwitchStateID value, or nil if the sSwitchStateName is not found.

Parameter Description
sSwitchStateName The unique name of an audio switch state.

GetAudioTriggerID

Get the trigger TAudioControlID (wrapped into a ScriptHandle).

Syntax

Copy
Sound.GetAudioTriggerID(const char* const sTriggerName)

Returns: ScriptHandle with the TAudioControlID value, or nil if the sTriggerName is not found.

Parameter Description
sTriggerName The unique name of an audio trigger.

SetAudioRtpcValue

Globally sets the specified audio RTPC to the specified value.

Syntax

Copy
Sound.SetAudioRtpcValue( hRtpcID, fValue )

Returns: nil

Parameter Description
hRtpcID The audio RTPC ID handle.
fValue The RTPC value.