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).
$wwise.add_audio_effect_zone(auxiliary_bus_id: int, control_value: float)
Adds an audio effect zone, used to process auxiliary bus effects.
| Parameter | Type | Meaning |
|---|
auxiliary_bus_id | int | The name of the auxiliary bus to use. |
control_value | float | Level of the effect ( 0->1) |
$wwise.get_attenuation_radius(sound_event: Reference) -> float
Gets the attenuation radius of the sound event.
| Parameter | Type | Meaning |
|---|
sound_event | Reference | Sound event to check. |
Returns float: The attenuation radius.
$wwise.get_bank_loaded(bank: Reference) -> bool
Query whether a bank is currently loaded.
| Parameter | Type | Meaning |
|---|
bank | Reference | The bank to check. |
Returns bool: True if the package is loaded
$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.
$wwise.get_event_max_duration(sound_event: Reference) -> float
Gets the max duration of a wwise event
| Parameter | Type | Meaning |
|---|
sound_event | Reference | The sound event. |
Returns float: The max duration in seconds, or -1.0 if invalid.
$wwise.get_id_from_string(name: string) -> int
Converts a string into an wwise id.
| Parameter | Type | Meaning |
|---|
name | string | String name to get id for. |
Returns int: The id.
$wwise.get_source_play_position(playing: Reference) -> float
Gets the played time of the first sound in a playing sound event.
| Parameter | Type | Meaning |
|---|
playing | Reference | The 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.
$wwise.get_time_since_event_started(playing: Reference, entity: Entity, sound_event: Reference) -> float
Gets the time passed since the event started.
| Parameter | Type | Meaning |
|---|
playing | Reference | The return value from a call to wwise.post_event. |
entity | Entity | The entity on which to retrieve time info. |
sound_event | Reference | Sound event to post. |
Returns float: The time in seconds since the event started or -1.0f if the event is not playing.
$wwise.has_event_finished(playing: Reference, entity: Entity, sound_event: Reference) -> bool
Gets if the event has finished playing.
| Parameter | Type | Meaning |
|---|
playing | Reference | The return value from a call to wwise.post_event. |
entity | Entity | The entity on which to retrieve finished info. |
sound_event | Reference | Sound event to post. |
Returns bool: Whether or not the event has finished playing.
$wwise.is_initialized() -> bool
Get whether wwise has initialized.
Returns bool: If wwise is initialized.
$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.
| Parameter | Type | Meaning |
|---|
entity | Entity | The entity on which to post the event. |
sound_event | Reference | Sound event to post. |
triggered | bool | set to true when you want event to post from beginning |
max_instances | int | Maximum instances that can be played on the same object. |
fadeout_time | float | Time to fadeout an audio event when it's destroyed in seconds. |
curve_type | int | Curve to use when fading out |
rumble_type | int | Rumble receiver type. 0=all users, 1=owning user, 2=none |
marker_callbacks | bool | Enable marker callbacks on the calling entity for this event. |
music_callbacks | bool | Enable music callbacks on the calling entity for this event. |
extra_duration | float | Extra time to keep the event alive. |
listener_channel | int | Channel to determine which listeners subscribe to this sound's gameobject. |
Returns Reference: An identifier to the sound played.
Reset the controller rumble.
$wwise.seek_event_percentage(entity: Entity, sound_event: Reference, percentage: float, seek_to_nearest_marker: bool, playing: Reference)
Seeks into a playing event
| Parameter | Type | Meaning |
|---|
entity | Entity | The entity on which to seek into event. |
sound_event | Reference | Sound event to post. |
percentage | float | percentage of event time to seek (0-1) |
seek_to_nearest_marker | bool | Set to true when you want to seek to nearest wav marker |
playing | Reference | The return value from a call to wwise.post_event. |
$wwise.seek_event_time(entity: Entity, sound_event: Reference, time_ms: int, seek_to_nearest_marker: bool, playing: Reference)
Seeks into a playing event.
| Parameter | Type | Meaning |
|---|
entity | Entity | The entity on which to seek into event. |
sound_event | Reference | Sound event to post. |
time_ms | int | time (in ms) to seek to |
seek_to_nearest_marker | bool | Set to true when you want to seek to nearest wav marker |
playing | Reference | The return value from a call to wwise.post_event. |
$wwise.set_attenuation_multiplier(entity: Entity, multiplier: float)
Sets the attenuation multiplier on a game object
| Parameter | Type | Meaning |
|---|
entity | Entity | The entity on which to set the multiplier. |
multiplier | float | Multiplier for attenuation value |
$wwise.set_controller_rumble_enabled(user: User, enabled: bool)
Set rumbled as enabled or disabled.
| Parameter | Type | Meaning |
|---|
user | User | The user for which rumble state should be changed. |
enabled | bool | Whether rumbled should be enabled. |
$wwise.set_debug_listener_position(position: vec3)
Set the position of the debug listener.
| Parameter | Type | Meaning |
|---|
position | vec3 | Position of the listener for debug distance. |
$wwise.set_default_listener(entity: Entity, mask: int)
Declare an entity as a default listener.
| Parameter | Type | Meaning |
|---|
entity | Entity | The entity to make a default listener. |
mask | int | The listener mask - dictates which sounds to which this listener is subscribed |
$wwise.set_override_rumble_mask(override_mask: int)
Set an override on controller rumble mask.
| Parameter | Type | Meaning |
|---|
override_mask | int | bitmask of controllers to rumble (0 means don't override) |
$wwise.set_position(entity: Entity, position: vec3, orientation: vec4)
Sets an entity's position and orientation.
| Parameter | Type | Meaning |
|---|
entity | Entity | The entity on for which to set the position. |
position | vec3 | The 3D position. |
orientation | vec4 | Quaternion representing the orientation. |
$wwise.set_rtpc_value(parameter: Reference, value: float, entity: Entity, playing_event: Reference)
Sets an RTPC value.
| Parameter | Type | Meaning |
|---|
parameter | Reference | The game parameter. |
value | float | RTPC value. |
entity | Entity | An entity (or NULL). |
playing_event | Reference | The return value from a call to wwise.post_event (optional). |
$wwise.set_rumble_device(device_name: string)
Sets the Wwise output rumble device for all new wwise game objects
| Parameter | Type | Meaning |
|---|
device_name | string | The rumble device name from Wwise. |
$wwise.set_rumble_listener_position(user: User, position: vec3, orientation: vec4)
Sets the rumble listener position for a user.
| Parameter | Type | Meaning |
|---|
user | User | The user handle. |
position | vec3 | The 3D position. |
orientation | vec4 | Quaternion representing the orientation. |
$wwise.set_state(name: string, value: string)
Sets the state of a state group (a global string setting).
| Parameter | Type | Meaning |
|---|
name | string | Name of the state group. |
value | string | Name of the state. |
$wwise.set_switch(group: Reference, value: Reference, entity: Entity)
Sets a switch state (a game object-specific string setting).
| Parameter | Type | Meaning |
|---|
group | Reference | The switch group. |
value | Reference | The switch value. |
entity | Entity | An entity (required). |
$wwise.set_volume(entity: Entity, fraction: float)
Set a volume override on a game object.
| Parameter | Type | Meaning |
|---|
entity | Entity | The entity on which to change the volume. |
fraction | float | 0->1 fraction of volume to play at. |
$wwise.use_bank(bank: Reference)
Declare a bank to be used, causing it to be or remain loaded.
| Parameter | Type | Meaning |
|---|
bank | Reference | The requested bank. |
$wwise.use_project(project: Reference)
Declare a project to be used, causing it to be or remain loaded.
| Parameter | Type | Meaning |
|---|
project | Reference | The requested project. |