Version
menu_open

Understanding Switches

In Wwise, Switches represent the different alternatives that exist for a particular game object within the game. Sound, music, and motion objects are organized and assigned to Switches so that the appropriate sound or motion object will play when a change is made from one alternative to another in game. The Wwise objects that are assigned to a Switch are grouped into a Switch Container. When an Event signals a change, the Switch Container verifies the Switch and the correct sound, music, or motion object is played.

Example 4. Using Switches - Example

Let's say you are creating a first-person shooter game, where the main character can walk and run through a variety of different environments. Within each environment, you have different ground surfaces, such as concrete, grass, and dirt, and you want different footstep sounds for each of these surfaces. In this case, you can create Switches for the different ground surfaces and then assign the different footstep sounds to the appropriate Switch. When the main character is walking on a concrete surface, the “concrete” Switch will become active and its corresponding sounds will play. If the character then moves from a concrete surface to a grassy surface, the “grass” Switch will become active and its corresponding sounds will play.

The following illustration demonstrates how the active Switch determines which footstep sound is played.



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