Version

menu_open

Defining the Scope of an Event Action

When creating an Event, you must define the Scope for each Action. The Scope specifies the extent to which the Action is applied to objects within the game. The Scope can either be applied globally to all game objects or the specific game object that triggered the Event. For some Actions, you can choose the Scope; for other Actions, the Scope is predetermined.

For example, let's say you created an Event for when the player leaves the game to enter the menu. This Event will play the “Enter_Menu” sound, pause all the sounds related to the player, and set the State to “Menu.” In turn, the "Menu" State is set to decrease the volume of the Master Audio Bus by 20 dB, but to increase the volume of the "Music" Audio Bus by 20 dB.

The scope for each of these Event Actions would be as follows:

Event Action

Scope

Comments

Play > Menu_Enter

Game Object

The scope is set to Game Object because Play Events are always triggered by a single game object.

Pause All

Global or Game Object

The Game Object that would call the Event in our scenario would be the player. Pausing the sounds related to the player would remove any annoying distraction while going through the menu. So, although it would be possible to specify a Global Scope, a Game Object Scope would in this situation allow the player to still hear the other sounds in the game.

Set State > Menu

Global

The scope for a Set State is always Global because it applies the State wherever it is found in the project. In our scenario, we have a "Menu" State set up on the Master Audio Bus and our "Music" Audio Bus. The former has its volume decreased, and the latter increased.

[Note] Note

This example is intended to illustrate Scope, not the best audio design choices. In reality, if both busses are mixing, there could be a very short delay in the application of the volume changes, which would likely result in some variety of click or buzz. Moreover, the maintenance of a constant volume for the "Music" Audio Bus would not be certain if it had any linear Effects. In that case, however, we could also use a Bypass Effect Action.


To define the scope of an Event:

  1. From the Scope list, select one of the following options:

    • Game object to apply the Event Action to the game object that triggered the Event.

    • Global to apply the Event Action to all game objects.


Was this page helpful?

Need Support?

Questions? Problems? Need more info? Contact us, and we can help!

Visit our Support page

Tell 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