Lesson 7

Table of Contents

Creating a Custom Switch Group for Music

In the last lesson you used States to determine which music should be played. You’ll essentially do the same thing for the Explore and Combat music; but, instead of using States, you’ll use Switches. In fact, you’re going to create a new Switch Group that specifically acts somewhat like a sub-Switch of the Gameplay State you created earlier. In other words, when the Music_State State Group is set to Gameplay, either the Combat or Explore music should play and the Switch Group you’re about to create will decide which music that will be.

[Tip]

The reason you need to use a Switch Group instead of simply adding Explore and Combat to the Music_State State Group is because State Groups can’t react to the RTPC that you’ll be configuring in the next exercise. The RTPC is necessary to gain greater control over when the transition between Combat and Explore music happens.

  1. In the Project Explorer, click the Game Syncs tab then, in the Switches folder, expand the Music Work Unit.

  2. Click the Create New Switch Group icon and name the new object Gameplay_Switch.

  3. With the Gameplay_Switch Switch Group selected, click the Create New Switch icon and name the new Switch Combat. Then create another Switch called Explore.


Was this page helpful?