版本
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.
每次播放容器时,将仅播放一个对象。
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.
备注 | |
---|---|
Continuous 播放模式始终应用于游戏对象作用域。有关更多详细信息,请参阅 “Defining the scope of containers”一节 章节。 |
下图显示了当特定枪支开火时,Wwise 如何使用 Continuous 模式的序列容器来播放声音序列。
在 Continuous 模式下将播放容器内的所有对象,这意味着您可以添加循环,并在对象间应用各种过渡。
备注 | |
---|---|
When a Random Container is in Continuous mode, some objects might be repeated several times before the complete list has played once. 这是由于对容器内的各个对象都应用了权重。 |
播放容器内的所有对象的方法如下:
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. 如果您未勾选该选项,则容器将从上次停止处继续播放,更确切地说是从播放列表中下一个对象的起始处播放。
Enable Loop to loop the entire contents of the container.
选择以下选项之一:
Infinite Looping to specify that the container will be repeated indefinitely.
No. of Loops,指定容器将播放特定次数。
如果您选择 No. of Loops 选项,请输入容器将被播放的次数。
选择 Transitions 选项,可以在播放列表中的对象间应用过渡。
Transition 参数变为可用。
从 Type 列表中,选择以下任一选项:
Xfade (amp) 淡变(恒定振幅),在两个对象之间保持恒定振幅进行交叉淡变。
Xfade (power) 淡变(恒定功率),在两个对象之间保持恒定功率进行交叉淡变。
Delay 延迟,在两个对象之间添加无声段落。
Sample Accurate 精确到采样点,对象之间进行零延迟的无缝过渡。Note that the Opus audio format, when streamed from disk, is not reliable for sample accurate transitions.
Trigger rate 触发速率,使用特定速率来触发容器内的对象。该选项对于模拟快速枪声十分实用。除此之外,也可使用 MIDI 来以更高的精度发送每个子弹声音。有关详细信息,请参阅 SDK 文档中的模拟快速射击章节。
备注 | |
---|---|
在使用 Xfade、Sample accurate 和 Trigge rate 时有一些局限性。以下几点值得注意:
|
在 Duration 文本框中,输入所需的交叉淡变、延迟或触发速率的时长。
备注 | |
---|---|
Duration 选项不适用于精确到采样点的过渡。 |