Community Q&A

Where Wwise users help each other out!

Audiokinetic's Community Q&A is the forum where Wwise users ask and answer questions within the Wwise community. If you would like to get an answer from Audiokinetic's Technical support team, make sure you use the Support Tickets page.

Music Switch Container in a Music Switch Container: when is that used?

0 votes
Hello!  I noticed you can put a Music Switch Container in a Music Switch Container, but I'm trying to understand how that system would work and when it would be applicable.  I haven't seen it in anyone's setup that I've come across so far - just curious.

asked Apr 15, 2017 in General Discussion by Blake (370 points)

1 Answer

+1 vote
Best answer
Here's an example:

You have different areas in a level that each have different music loops. Within each area the music changes based on player health.

In Wwise you'd have a top-level switch container that uses your "Area" switch group. Inside that container there would be multiple switch containers (one for each area), and they would all use the "Player Health" switch group. Inside those containers you would have all possible music tracks for the container's corresponding area.

So if you're in Area 1 and your health is normal, you'd set the switch on the Area switch group to 1 and the switch on the Player Health switch group to normal. If the player loses health, you'd set the Player Health switch to Low, and you'd hear the Area 1/Low Health music. If the player then moves to Area 2, you'd set the Area switch group to 2, and you'd be hearing Area 2/Low Health music. Player heals while still in Area 2, and you get the Area 2/Normal Health music, etc. etc.


That's just one example. I'm sure there are plenty of situations where nested switch containers could be useful.
answered Apr 19, 2017 by Ian S. (1,900 points)
selected Apr 19, 2017 by Blake
ok, got it!  I think it will click with me a lot more if I try it out myself.  Thanks for the example - very helpful.