Version
Containers can contain multiple objects. When a container is played, one or all of its child objects is played depending on the Play Mode setting:
Step play mode: Plays one child object each time the container is played.
Continuous play mode: Plays all the child objects each time the container is played. This mode includes options for looping and for transitions between objects.
You might want one object within the container to be played each time it is called. For example, each time a handgun is fired you might want only one sound to be played. As another example, each time a character speaks you might want them to deliver only one line of dialogue. To achieve this, set the play mode of the container to Step.
The following illustration shows what happens when a handgun is fired and the sounds for that handgun are in a Random Container in step mode.
To play one object in the container:
Open the Property Editor for a Random or Sequence Container.
In the Property Editor, select the Step option of the Play Mode property.
The container will only play one object each time it is played.
In other situations, you might want all the objects in the container to be played each time the container is played. For example, when certain guns in your game are fired, a series of sounds that must be played in sequence. To achieve this, set the Play Mode of the container to Continuous.
Note | |
---|---|
Continuous play mode is always applied on the game object scope. Refer to Defining the scope of containers for further details. |
The following illustration shows how Wwise manages the sequence of sounds played when a particular gun is fired using a Sequence Container in continuous mode.
In Continuous mode, all objects within the container are played, which means you can also add looping and various transitions between the objects.
Note | |
---|---|
When a Random Container is in Continuous mode, some objects might be repeated several times before the complete list has played once. This is due to the weighting applied to each object within the container. |
To play all objects within the container:
Open the Property Editor for a Random or Sequence Container.
In the Play Mode property, select the Continuous option.
For Sequence Containers, enable Always reset playlist to return the playlist to the beginning each time the container is played. If you clear this option, the container will continue playback from where it was stopped or more precisely at the beginning of the next object in the playlist.
Enable Loop to loop the entire contents of the container.
Select one of the following options:
Infinite Looping to specify that the container will be repeated indefinitely.
No. of Loops to specify a particular number of times that the container will be played.
If you selected the No. of Loops option, type the number of times you want the container to be played.
Select the Transitions option to apply a transition between the objects in the playlist.
The Transition options become available.
From the Type list, select one of the following options:
Xfade (amp) to add a crossfade between two objects using constant amplitude.
Xfade (power) to add a crossfade between two objects using constant power.
Delay to add a silence between two objects.
Sample Accurate to create a seamless transition with no latency between objects. Note that the Opus audio format, when streamed from disk, is not reliable for sample accurate transitions.
Trigger rate to define a specific rate at which the objects within the container will be triggered. This option is useful for simulating rapid gun fire. Alternatively, you can use MIDI to post each bullet sound with greater precision. Refer to Simulating Rapid Gunfire in the SDK documentation for details.
Note | |
---|---|
There are some limitations and restrictions when using Xfade, Sample accurate, and Trigger rate transitions. A couple of notable ones are:
|
In the Duration text box, type the length of time you want for the crossfade, delay, or Trigger rate.
Note | |
---|---|
The Duration option is not available for sample accurate transitions. |
Questions? Problems? Need more info? Contact us, and we can help!
Visit our Support pageRegister your project and we'll help you get started with no strings attached!
Get started with Wwise