menu
 

Lesson 5

Table of Contents

Mapping an RTPC to a Switch

If Cube directly communicated the Health_Status Switch Group to Wwise you’d be done implementing the guitars. However, since Cube sends the health information as a game parameter (RTPC), you’ll need to map that game parameter to the Health Status Switch Group you just configured. The ability to map Game Parameters to a Switch Group is a function within the Switch Group itself.

  1. In the Project Explorer, click the Game Syncs tab and select the Health_Status Switch Group.

  2. Enable the Use Game Parameter check box.

    Currently you see an empty graph because you have yet to indicate which Game Parameter should be associated with the Health_Status Switch Group.

  3. In the [>>] selector menu, choose Game Parameters > PlayerHealth.

    A graph similar to an RTPC curve becomes available.

    Notice that the four Switch values you created earlier are displayed on the Y axis and the 0-100 health Game Parameter represents the X axis.

    Now you can map how a change in the PlayerHealth Game Parameter correlates to the four Switches you configured.

  4. Double-click the curve at a value of 20.

    A control point appears.

  5. Drag the control point at the far left up to the Nearly_Defeated line.

    Now the graph shows that a health value from 0-20 means that the player is nearly defeated.

  6. Create a new point at a value of 50 and drag the control point at 20 to the Badly_Injured line.

  7. Create a new point at a value of 80 and drag the control point at 50 to the Flesh_Wound line.

  8. Drag the control point at 80 to the Healthy line.

    The graph now properly reflects how a change in PlayerHealth should affect the Health_Status State Group. You can now test your implementation by simulating a change in the PlayerHealth Game Parameter.

  9. In the Soundcaster Music Testing Session you configured, play the music and then adjust the PlayerHealth RTPC to hear the result of your work.

    Now you’re ready to check the results of your work in the game itself. Everything you need for this in the game happens as you go through the first teleporter. Be sure to pick up the super gem to check that it's bringing in the arpeggiated part, but don’t use it to eliminate the monsters too quickly. Let them attack you, so you can see how your lower health brings in the guitars!

  10. Start a Capture Session and go to the Profiler layout while continuing to simulate in Soundcaster.

    You can see how the Stingers are implemented, as well as all of the other implementations you’ve done in this lesson.

    You’re ready to try things out in the game. While you did some work with the Explore and Boss music, this project is currently set to play the Combat music when building the game. Don’t worry, in the next lesson you’ll learn how Wwise can switch between the various pieces of music you’ve been working on.

  11. Go to the SoundBank Layout, generate the SoundBanks and play the game.

    [Tip]

    Game Syncs can connect to objects in the Interactive Music Hierarchy just as they connect to objects in the Actor-Mixer Hierarchy. Simple applications, such as using an RTPC to control the volume of a Music Track, can be very effective. Review the Wwise-101 course Lesson 3 for more information.

    You are now beginning to see just what truly interactive music is about. Understanding how game play can drive a score is important, but implementing these concepts in a way that doesn't sound jarring or unmusical is where a deeper knowledge of music integration is necessary. Move on to the next lesson to discover features within Wwise that allow you to accomplish this!


Was this page helpful?