版本
menu_open

Defining the contents and behaviors of Music Switch Containers

Music Switch Containers allow you to group pieces of music according to the different alternatives that exist for particular elements within a game. 在 Switch Container(切换容器)中,Swtich(切换开关)或 State(状态)代表着各种不同条件。例如,游戏中主角采用不同的行动模式时,可以针对性地创建 Music Switch Container,其中包含战斗场景、紧张情况以及潜行模式的 Switch。

各 Switch/State 对应着特定条件选项下的音乐对象。本例中,所有游戏战斗相关的 Music Segment 将对应 Switch Fight,与紧张情况相关的 Music Segment 将对应 Switch Stress,以此类推。游戏调用切换容器时,Wwise 会验证哪个 Switch/State 处于激活状态,进而确定播放哪个 Container 或 Music Segment。

下图表示当事件调用了 “Character Action”(角色行动模式)这个 Music Switch Container 时,会发生什么。该容器中,已根据游戏中可能的角色动作类型将音乐分成了几组,有两种状态:潜行(Stealth)和战斗(Fight)。事件调用 Music Switch Container 时,角色正处于潜行模式(State=Stealth),因此会播放潜行模式音乐。A Music Playlist Container is used to group the different pieces of music within the stealth state so that different variations of the music can be played each time the character is in stealth mode.

Associating Music Switch Containers with game syncs

The Music Switch Container can be based on states, Switches, or Game Parameters. 要将 Music Switch Container 关联到 Game Parameter,需要先在 Switch Group Property Editor(切换开关组属性编辑器)中将 Switch Group(切换开关组)关联到所需的 Game Parameter。关于 RTPC(实时参数控制)如何与 Switch 进行关联的详细信息,请参阅“Mapping Game Parameter values to Switches”一节

设置 Music Switch Container 时,首先需要将 Switch Group 或 State Group(状态组)指派给容器,这决定了音乐将对哪些 Switch、State 或 RTPC 做出反应。

为容器指派 Switch\State Group,或将 RTPC 关联至 Switch之前,必须先创建它们。有关创建切换开关组、状态组和 RTPC 的信息,请参阅:

To associate a Music Switch Container with a game sync:

  1. 将音乐切换容器加载到音乐编辑器。

  2. 执行以下操作之一:

    • 点击编辑器顶部的 [>>] 按钮,并选择 Game Sync(游戏同步器)。

    • Drag and drop a Switch Group or a State Group object from the Project Explorer to the top area of the editor.

Defining the behaviors of music objects within Music Switch Containers

If you are re-using different parts of your music, your Switches or states may contain several of the same music objects. 这种情况下,需要确定 State 改变时这些共用音乐对象如何播放。视具体情况而异,可能需要音乐对象继续播放,或在下一个同步点停止并从头播放。

下图中, Stealth(潜行)和 Stress(紧张)两个 Switch 关联了同一播放列表编组(S2_Playlist) 。游戏从潜行切换至紧张模式时(反之亦可),可以选择在下一同步点继续播放 S2_Playlist,或停止当前音乐段落并从播放列表开头播放。

定义 Music Switch Container 内音乐对象播放行为的方法如下:

  1. Load a Music Switch Container into the Property Editor.

  2. In the Play Options group, do one of the following:

    Select the Continue to play on Switch change option if you want to force the music object that is in both the source and destination Switches/States to continue playing during a change in Switch/State.

    如果希望 Switch/State 改变时,源和目标共用的音乐对象在下一个同步点停止并从头播放,则不应勾选 Continue to play on Switch change 选项。

    [备注]备注

    You can define the exact sync point and use fades to make the transition seamless.

Associating music objects with States and Switches

After you have assigned one or more State or Switch Groups to the Music Switch Container, you can associate different music objects to various combinations of States or Switches within the assigned groups.

每个特定的 State 或 Switch 组合称为一个 Path(路径), Path 中还可能包括通配符。Music Switch Container 内的音乐对象将会与 Path 进行关联。

指派音乐对象的方法如下:

  1. 将音乐切换容器加载到音乐编辑器。

    此容器的状态组和切换开关组会显示在音乐切换容器的顶部区域中。

  2. 在顶部每个 State Group 或 Switch Group 中选择一个状态。

  3. 点击 Add Path(添加路径)按钮,在列表中创建条目。

    条目将显示在列表中,但尚未指派对象。

  4. 点击条目上的 [...] 按钮,为条目指派音乐对象。

    对象浏览器将弹出,并显示 Music Switch Container 的子对象。

  5. 选中一个对象,点击 OK。

使用拖拽方式指派音乐对象的方法如下:

  1. 将 Music Switch Container 加载到 Music Editor。

    此容器内的 State Group 和 Switch Group 会显示在 Music Switch Container 的顶部。

  2. Drag and drop one of the Music Switch Container's children over a Switch or state on the top area section to create an association with this children.


此页面对您是否有帮助?

需要技术支持?

仍有疑问?或者问题?需要更多信息?欢迎联系我们,我们可以提供帮助!

查看我们的“技术支持”页面

介绍一下自己的项目。我们会竭力为您提供帮助。

来注册自己的项目,我们帮您快速入门,不带任何附加条件!

开始 Wwise 之旅