Sample Project
Dialogue
The Dialogue example demonstrates how you can use Wwise’s dynamic dialogue features to organize dialogue that adapts to gameplay situations as they happen. Dynamic dialogue uses a set of rules within a decision-tree structure to determine which piece of dialogue to play at any particular moment in game.
In the sample project’s game, the main player character has to work with NPCs to accomplish mission objectives. The main player can radio the NPCs, who in this case are two on-duty police officers. Through their radio responses, the two officers report back with details of their current assignment and status. For example, the officers can report that they are rescuing a hostage, then later report on whether their rescue was successful.
To listen to the Dialogue example:
In the Events tab of the Project Explorer, locate the Dialogue Work Unit in the Dynamic Dialogue section and double-click the Objective_Status Dialogue Event.
The Objective_Status Dialogue Event is loaded into the Dialogue Event Editor.
In the Dialogue Event Editor, select an argument from each column as follows:
In the Unit column, select either Unit_A or Unit_B.
In the Objective column, select either DefuseBomb, NeutralizeHostile, or RescueHostage.
In the ObjectiveStatus column, select either Completed or Failed.
Each argument you choose is highlighted
In the Argument Path Filter list, select Current Selection.
The selected argument path and its associated object are displayed.
In the Transport Control, click Play to hear the object.
The object associated with the selected argument path is played.
To listen to other argument paths in the dialogue example, repeat Steps 3 to 5.
Dynamic dialogue is a flexible tool for creating responses on the fly. These responses are determined through a decision-tree structure that selects audio based on multiple game conditions. The example of dynamic dialogue provided with the sample project shows how to implement dialogue functionality in a game that uses game variables to trigger the particular sentences. Dynamic Dialogue is particularly well suited to create play-by-play for sports games, but any game genres could see advantages to use this system. It can also be used for SFX in situations where large hierarchies are needed like footsteps structures for example.
In this project, in the Objective_Status Dialogue Event example, a series of arguments and arguments values has been created to reflect multiple game situations and outcomes. These arguments create a matrix of argument paths that can be triggered at any moment by the player’s radio call to the police officers.
In this project, in the Objective_Status Dialogue Event example, a series of arguments and arguments values has been created to reflect multiple game situations and outcomes. These arguments create a matrix of argument paths that can be triggered at any moment by the player’s radio call to the police officers.
In this game, each time a police officer responds to the player, the game triggers the “Objective_Status” Dialogue Event while setting the actual argument values. Consequently, the object associated with the argument path, either a voice object or a container holding sound objects, is heard. This example doesn’t take advantage of the Probability and Weighting tools, but you can use them in your game to have more control over which piece of audio is played, if any.
When you create dynamic dialogue for a game, you might realize that your game can’t always provide all the information you need at all times. In this example, when the player radios an officer for his status, the officer NPC might be between actions. To deal with this possibility, the dynamic dialogue system includes a fallback mechanism. The fallback mechanism allows you to trigger generic dialogue for situations where an argument path does not have an associated object, or when an argument value in the argument path is not specified by the game.
For example, the sample project contains the following fallback lines:
Unit_B.*.Completed: “Mission accomplished. Nice job everyone.”
Unit_B.*.Failed: “Let’s do better next time, OK?”
Note | |
---|---|
When an argument is used to create a fallback argument path, the argument is represented by an asterisk in the path name. In the example above, the asterisk represents the argument: “Objective”. |
Compare these to specific lines such as:
Unit_B.RescueHostage.Completed: “We got the hostage.”
Unit_B.DefuseBomb.Failed: “We can’t stop the bomb. Everyone out!”
The fallback mechanism is a really important aspect because it provides a “safety net” for the scriptwriter. These lines could be delivered in cases in which the game does not specify a particular objective. They could also be useful in a situation where new objectives are added to the game after the voice recordings are completed. Because no specific dialogue exists for the new objectives, the fallback dialogue will be selected automatically.
Was this page helpful?
Need Support?
Questions? Problems? Need more info? Contact us, and we can help!
Visit our Support pageTell us about your project. We're here to help.
Register your project and we'll help you get started with no strings attached!
Get started with Wwise