Lesson 5

Table of Contents

Configuring the Switch Group

The first step is to identify which Switch Group will act upon the music. The problem is that there is currently no Switch Group implemented in the game that identifies health status. There is a health Game Parameter, but it uses a 0-100 numeric scale and Switch Tracks cannot directly respond to game parameters. Rather than having a programmer implement a health Switch Group just for the music system, you can use a feature designed to translate a game parameter into a switch group. The first step is to go ahead and create a Switch Group specifically for health and later in the lesson you’ll learn how to control it with the health game parameter.

  1. In the Project Explorer choose the Game Syncs tab.

    You’re going to create a new Switch Group. But, rather than placing it within the Default Work Unit, you’ll create a Music Work Unit which in part makes it much easier to see which objects in the various hierarchies belong to the music system.

  2. Create a new Work Unit in the Switches folder called Music.

  3. Right-click the Switches Music Work Unit, and choose New Child > Switch Group.

  4. Name the new Switch Group Health_Status.

    Now you need to configure the specific Switches within the Switch Group. The goal is to hook this Switch Group to the Electric Guitar Random Tracks, each of which contains three different guitar parts with varying intensity and another empty Sub-Track. This means you’ll want to have four different stages of health to relate to each of the four Sub-Tracks that are available.

  5. With the Health_Status Switch Group selected, right-click and select New Child > Switch.

  6. Name the new Switch Healthy.

  7. Create additional Switches named Flesh_Wound, Badly_Injured, and Nearly_Defeated.

    The Switches are added to the Health_Status Switch Group. The Switches will appear in alphabetical order, but it’s not important that the order doesn’t match the progression of the health status change.


Was this page helpful?