Skip to content

$wwise

Sound: post Wwise events and set parameters.

28 natives. Read-only natives only look things up; the rest change something. Parameter types use the language's names (Types).

add_audio_effect_zone

$wwise.add_audio_effect_zone(auxiliary_bus_id: int, control_value: float)

Adds an audio effect zone, used to process auxiliary bus effects.

ParameterTypeMeaning
auxiliary_bus_idintThe name of the auxiliary bus to use.
control_valuefloatLevel of the effect ( 0->1)

get_attenuation_radius

$wwise.get_attenuation_radius(sound_event: Reference) -> float

Gets the attenuation radius of the sound event.

ParameterTypeMeaning
sound_eventReferenceSound event to check.

Returns float: The attenuation radius.

get_bank_loaded

$wwise.get_bank_loaded(bank: Reference) -> bool

Query whether a bank is currently loaded.

ParameterTypeMeaning
bankReferenceThe bank to check.

Returns bool: True if the package is loaded

get_debug_draw_state

$wwise.get_debug_draw_state() -> bool

Returns true if we'd like to draw the audio attenuation radius and false otherwise.

Returns bool: Whether or not we should draw the radius.

get_event_max_duration

$wwise.get_event_max_duration(sound_event: Reference) -> float

Gets the max duration of a wwise event

ParameterTypeMeaning
sound_eventReferenceThe sound event.

Returns float: The max duration in seconds, or -1.0 if invalid.

get_id_from_string

$wwise.get_id_from_string(name: string) -> int

Converts a string into an wwise id.

ParameterTypeMeaning
namestringString name to get id for.

Returns int: The id.

get_source_play_position

$wwise.get_source_play_position(playing: Reference) -> float

Gets the played time of the first sound in a playing sound event.

ParameterTypeMeaning
playingReferenceThe return value from a call to wwise.post_event.

Returns float: The play position in seconds of the current sample or -1.0f if a sample is not playing.

get_time_since_event_started

$wwise.get_time_since_event_started(playing: Reference, entity: Entity, sound_event: Reference) -> float

Gets the time passed since the event started.

ParameterTypeMeaning
playingReferenceThe return value from a call to wwise.post_event.
entityEntityThe entity on which to retrieve time info.
sound_eventReferenceSound event to post.

Returns float: The time in seconds since the event started or -1.0f if the event is not playing.

has_event_finished

$wwise.has_event_finished(playing: Reference, entity: Entity, sound_event: Reference) -> bool

Gets if the event has finished playing.

ParameterTypeMeaning
playingReferenceThe return value from a call to wwise.post_event.
entityEntityThe entity on which to retrieve finished info.
sound_eventReferenceSound event to post.

Returns bool: Whether or not the event has finished playing.

is_initialized

$wwise.is_initialized() -> bool

Get whether wwise has initialized.

Returns bool: If wwise is initialized.

post_event

$wwise.post_event(entity: Entity, sound_event: Reference, triggered: bool, max_instances: int, fadeout_time: float, curve_type: int, rumble_type: int, marker_callbacks: bool, music_callbacks: bool, extra_duration: float, listener_channel: int) -> Reference

Plays a sound on an entity immediately.

ParameterTypeMeaning
entityEntityThe entity on which to post the event.
sound_eventReferenceSound event to post.
triggeredboolset to true when you want event to post from beginning
max_instancesintMaximum instances that can be played on the same object.
fadeout_timefloatTime to fadeout an audio event when it's destroyed in seconds.
curve_typeintCurve to use when fading out
rumble_typeintRumble receiver type. 0=all users, 1=owning user, 2=none
marker_callbacksboolEnable marker callbacks on the calling entity for this event.
music_callbacksboolEnable music callbacks on the calling entity for this event.
extra_durationfloatExtra time to keep the event alive.
listener_channelintChannel to determine which listeners subscribe to this sound's gameobject.

Returns Reference: An identifier to the sound played.

seek_event_percentage

$wwise.seek_event_percentage(entity: Entity, sound_event: Reference, percentage: float, seek_to_nearest_marker: bool, playing: Reference)

Seeks into a playing event

ParameterTypeMeaning
entityEntityThe entity on which to seek into event.
sound_eventReferenceSound event to post.
percentagefloatpercentage of event time to seek (0-1)
seek_to_nearest_markerboolSet to true when you want to seek to nearest wav marker
playingReferenceThe return value from a call to wwise.post_event.

seek_event_time

$wwise.seek_event_time(entity: Entity, sound_event: Reference, time_ms: int, seek_to_nearest_marker: bool, playing: Reference)

Seeks into a playing event.

ParameterTypeMeaning
entityEntityThe entity on which to seek into event.
sound_eventReferenceSound event to post.
time_msinttime (in ms) to seek to
seek_to_nearest_markerboolSet to true when you want to seek to nearest wav marker
playingReferenceThe return value from a call to wwise.post_event.

set_attenuation_multiplier

$wwise.set_attenuation_multiplier(entity: Entity, multiplier: float)

Sets the attenuation multiplier on a game object

ParameterTypeMeaning
entityEntityThe entity on which to set the multiplier.
multiplierfloatMultiplier for attenuation value

set_controller_rumble_enabled

$wwise.set_controller_rumble_enabled(user: User, enabled: bool)

Set rumbled as enabled or disabled.

ParameterTypeMeaning
userUserThe user for which rumble state should be changed.
enabledboolWhether rumbled should be enabled.

set_debug_listener_position

$wwise.set_debug_listener_position(position: vec3)

Set the position of the debug listener.

ParameterTypeMeaning
positionvec3Position of the listener for debug distance.

set_default_listener

$wwise.set_default_listener(entity: Entity, mask: int)

Declare an entity as a default listener.

ParameterTypeMeaning
entityEntityThe entity to make a default listener.
maskintThe listener mask - dictates which sounds to which this listener is subscribed

set_override_rumble_mask

$wwise.set_override_rumble_mask(override_mask: int)

Set an override on controller rumble mask.

ParameterTypeMeaning
override_maskintbitmask of controllers to rumble (0 means don't override)

set_position

$wwise.set_position(entity: Entity, position: vec3, orientation: vec4)

Sets an entity's position and orientation.

ParameterTypeMeaning
entityEntityThe entity on for which to set the position.
positionvec3The 3D position.
orientationvec4Quaternion representing the orientation.

set_rtpc_value

$wwise.set_rtpc_value(parameter: Reference, value: float, entity: Entity, playing_event: Reference)

Sets an RTPC value.

ParameterTypeMeaning
parameterReferenceThe game parameter.
valuefloatRTPC value.
entityEntityAn entity (or NULL).
playing_eventReferenceThe return value from a call to wwise.post_event (optional).

set_rumble_device

$wwise.set_rumble_device(device_name: string)

Sets the Wwise output rumble device for all new wwise game objects

ParameterTypeMeaning
device_namestringThe rumble device name from Wwise.

set_rumble_listener_position

$wwise.set_rumble_listener_position(user: User, position: vec3, orientation: vec4)

Sets the rumble listener position for a user.

ParameterTypeMeaning
userUserThe user handle.
positionvec3The 3D position.
orientationvec4Quaternion representing the orientation.

set_state

$wwise.set_state(name: string, value: string)

Sets the state of a state group (a global string setting).

ParameterTypeMeaning
namestringName of the state group.
valuestringName of the state.

set_switch

$wwise.set_switch(group: Reference, value: Reference, entity: Entity)

Sets a switch state (a game object-specific string setting).

ParameterTypeMeaning
groupReferenceThe switch group.
valueReferenceThe switch value.
entityEntityAn entity (required).

set_volume

$wwise.set_volume(entity: Entity, fraction: float)

Set a volume override on a game object.

ParameterTypeMeaning
entityEntityThe entity on which to change the volume.
fractionfloat0->1 fraction of volume to play at.

use_bank

$wwise.use_bank(bank: Reference)

Declare a bank to be used, causing it to be or remain loaded.

ParameterTypeMeaning
bankReferenceThe requested bank.

use_project

$wwise.use_project(project: Reference)

Declare a project to be used, causing it to be or remain loaded.

ParameterTypeMeaning
projectReferenceThe requested project.