1.4 Events and Actions

 

1.4) Events and Actions

 
 

 

For everything that happens in the game that may need an audio response, the Audio Programmer has added lines of code to transmit a message informing Wwise about what has occurred. This message is referred to as a Game Call. Game Calls are just simple messages that say things like “Hey, the shotgun was fired”, but in reality this message is sent as a string of text or numbers. When this message is received by the Wwise Audio Engine, any number of things can happen as defined by you, the Technical Sound Designer.

The first thing that you usually need to do is to create an Event, so that Wwise can catch an incoming Game Call. Think of it like a game of catch between the game engine and the audio engine. The ball being thrown from the game engine is the Game Call, while an Event is a type of Object within Wwise designed specifically to catch Game Calls. The important thing to note is that each Game Call needs an identically named Event to be received by Wwise.

Pic01 Events Tab

Pic02 Event Icon

Pic03 Implemented Events

Pic04 Event Editor

Pic05 Actions

Pic06 Target

Pic07 Browse for Target

Pic08 Play the Event

Pic09 Action Properties

  1. In the Project Explorer view of the Designer Layout, click the Events tab.

    It’s in the Events tab where you’re going to allow Wwise to understand the incoming Event Game Calls that Wwise should expect to see transmitted from the game engine. Within the Project Explorer’s Events tab (Pic01 Events Tab) you see a folder titled Events and within that folder there is an Object called Default Work Unit. Work Units serve as the foundation for Wwise. Work Units contain information related to a particular section or element within your project and help you organize your project.

    In many games, many people or even companies are concurrently working on different parts of a game. For example, one team may be working on all of the weapon sounds, while another focuses on ambient sounds. In this scenario, each team could have its own copy of Wwise and create their own unique Work Unit that houses their assigned Events. Later in the production, multiple Work Units can be brought into a single project in order to bring all of the elements in a game together.

    Work Units are actually XML files created within the project structure of Wwise.

    Anything you create in Wwise is referred to as an Object. Be careful not to confuse this with the Game Object term which relates to items within the game that play back the sound sent from the sound engine. Objects in the Wwise interface are represented by small square icons. There are over 20 types of Objects, each providing unique functionality for how you can create and control sound within Wwise. Objects exist within a hierarchy and typically Work Units are at the top of this hierarchy. Like the bricks that make up a building, these Objects are building blocks that can be used for purely practical applications, or they can be arranged in intricate and creative ways.

  2. Click the Default Work Unit within the Events folder and notice the Event icon. (Pic02 Event Icon)

    If the icon is being clicked, a new Event Object is created and you are prompted to type its name. How you name an Event Object is critical. It is imperative that the name of the Event Object perfectly matches that name of the game call being transmitted from the game engine. Just like dialing a phone number, if you’re off at all, it won’t connect.

    To ensure that this works well, typically the Technical Sound Designer decides what kinds of things the sound engine needs to be aware of and creates the Events for each of these things in Wwise. The Technical Sound Designer then informs the Audio Programmer of the Event names so that they can program the game engine to transmit game calls with the same name. In this scenario, the Platformer Game has all Events implemented, so there is no need to create a new Event. You can see all used Events in the Default Work Unit, nicely organised into Virtual Folders. (Pic03 Implemented Events) There is however not a single Event linked to a Wwise Object, which is what you are doing next.

    Selecting an Object reveals its associated properties in the Event Editor to the right. Different Objects have editors of varying complexity. Most have a Notes field that is incredibly important because you can add extra information to avoid any confusion about the Event name. With a name like Fire_Shotgun_Player, the Event likely relates to the shotgun being fired, but not all Events are intuitively named. Notes provide a way to provide more information to help you and others who might be reviewing your work better understand what you’ve created.

    Let’s now link the footstep sound to an Event. This is done via an Action defined for the footstep Event.

  3. Click the Play_foley_footstep Event in the Robot > Foley Folder of the Events Tab.

    The Event Editor to the right is displayed showing the Event’s name and its Event ID at the top and two empty panes below. This is where you indicate what Action you want to happen when the Wwise Audio Engine receives the Play_foley_footstep Event from the game engine. (Pic04 Event Editor)

  4. Click the Add >> button found in the lower left of the Event Editor.

    A list of possible actions is displayed. As you can see, there are a lot of options, but all you need for now is the first option – Play. (Pic05 Actions)

  5. Select Play from the Action list.

    The play action is added, but the action's Target column indicates that there is no Object being referenced. Now you need to indicate that you want to play the platformer_foley_footstepGeneric_M01 Sound SFX Object that you created previously. (Pic06 Target)

    If you do not see the Target column in the left pane, then drag the border between the two panes in the Event Editor to the right until the target column is displayed.

  6. Select the empty Target Box, click Browse… and select your Sound SFX Object from the Default Work Unit in the Actor-Mixer Hierarchy. Click OK. (Pic07 Browse for Target)

    You’ve now connected the Play_foley_footstep Event to the platformer_foley_footstepGeneric_M01 Sound SFX Object. Wwise lets you simulate what will happen in the game by allowing you to play not just Sound SFX Objects, but also the Events themselves. Playing the Play_foley_footstep Event should trigger the footstep sound. Before you can do this, you need to make sure that the Play_foley_footstep Event is visible in the Transport Control view. (Pic08 Play the Event)

  7. Inspect the Action in the Event Editor more closely. (Pic09 Action Properties)

    An event can have a lot of different actions, targeting completely different aspects of the game’s audio. Each action, depending on the action itself, has quite a few properties that can change the behaviour of the targeted Wwise Object, such as Probability and Fade-in and Fade-out Options. You don’t need to change anything for the footstep Event for now.