版本
menu_open

Working with States and State Groups for dynamic dialogue

Many games today, especially sports games, have an audio component that is dynamic, or driven by the Action that is taking place in game. 如果用传统方法模拟真实对白,可能要创建成千上万的素材,再构建复杂的 Switch Container(切换容器)层级结构,才能满足所有可能的方案。由于内存成本昂贵,所以您需要通过有效的方式来管理工程中的素材。

To overcome these challenges, Wwise introduces a different approach to manage dynamic dialogue. Every possible condition or outcome in the game is predefined in Wwise using States and State Groups. State Groups can be use to represent the different categories that exist in your game. For example, in a football game, the list of State Groups could include Teams, Players, and Actions. Each State Group or category also needs a set of corresponding State values. In our football example, the Teams State Group could include State values, such as Dallas, Pittsburgh, New England, and so on.

The State Groups and States are arranged into Dialogue Events where every possible game condition is re-created. These conditions called paths are then assigned to a particular voice object. As the game is being played, the current States are matched with those created in the Dialogue Events in Wwise to determine what piece of dialogue to play.

State Groups represent the different categories that can exist in your game, for example Teams and Players in a sports game, or Friends, Enemies, and Weapons in an action adventure game. 在 Project Explorer(工程浏览器)的 Game Syncs(游戏同步器)选项卡中,可以管理 State Group 列表。

为了让您在界面中轻松识别 State Group 和 State,Wwise 将它们用特定图标表示。

图标

代表

State Group

State Group value

Using States with dynamic dialogue - example

Let's say you are creating a golf game that will have a play-by-play commentary. You will need to create State Groups for each of the different categories in your game. Each State Group will then need all the different States that correspond to that category. For our golf game, we will need a variety of State Groups including Players, Clubs, Courses, Shots, Locations, Reactions, and so on.

The following illustration shows you how you could divide up some of the different categories in a golf game into State Groups and corresponding States.

After the State Groups and States are defined, you can start adding them to the Dialogue Events that are required for your game. For more information on creating Dialogue Events, refer to “创建 Dialogue Event”一节.

Creating State Groups

You can create all the State Groups that you need for your project on the Game Syncs tab of the Project Explorer.

在 Project Explorer 中新建 State Group 的方法如下:

  1. 在 Project Explorer 中,切换至 Game Syncs(游戏同步器)选项卡。

  2. 在 State(状态)层级中,执行以下操作之一:

    选中 Virtual Folder(虚拟文件夹)或 Work Unit(工作单元),并点击 Project Explorer 工具栏上的 State Group 图标。

    右键点击 Virtual Folder 或 Work Unit ,从快捷菜单中选择 New Child > State Group(新建子项 > 状态组)。

    新 State Group 将被添加至 State Group 列表。

  3. 将默认名称替换为更合适的命名。

    [备注]备注

    各 State Group 不得重名,而且名称只能包含字母、数字和下划线。

  4. 根据需要,继续添加 State Group。

    [技巧]技巧

    You can double-click a State Group to load it into the Property Editor where you can add information about the State Group in the Notes field.

Creating States

Each State Group that you create can have many different values. 分别代表每个类别内的不同选项。例如,Player Name(玩家名字)这个 State Group 中,各 State(状态)就是游戏中各个玩家的名字。可以在 Project Explorer (工程浏览器)的 Game Syncs(游戏同步器)选项卡中创建工程所需的所有状态。

在 Project Explorer 中新建 State 的方法如下:

  1. 在 Project Explorer 中,切换至 Game Syncs 选项卡。

  2. 在 State(状态)层级中,执行以下操作之一:

    选中 State Group,并点击 Project Explorer 工具栏中的 State 图标。

    Right-click a State Group and select New Child > State from the shortcut menu.

    A new State is added to the list of State Groups.

  3. Replace the default name with one that best represents the State Group value.

    [备注]备注

    Each State name within a State Group must be unique.

  4. Continue to add States as needed.

    [技巧]技巧

    You can double-click a State to load it into the Property Editor where you can add information about the State in the Notes field.

Deleting States or State Groups

You may need to delete a State Group or State that you no longer need. When you delete a State Group, all States within that State Group will also be deleted. Keep in mind that if you delete a State Group, it will be removed from all Dialogue Events that use it.

删除 State Group 的方法如下:

  1. 在 Project Explorer 中,切换至 Game Syncs 选项卡。

  2. In the State Groups section, right-click the State Group or State that you want to delete and select Delete Selection.

    The selected State Group or State is deleted.

    [技巧]技巧

    You can also select the State Group or State and press the Delete key.


此页面对您是否有帮助?

需要技术支持?

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

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

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

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

开始 Wwise 之旅