Table of Contents
In Cube, the main mode of gameplay has the Wwise Wwizard running around the map finding and defeating monsters with his magic gems. You’ve already defined this mode as the Gameplay State in the Music_State State Group. Currently, you have the Combat music associated with the Gameplay State, but that music is a bit intense for the more subdued moments of the game when the player is just walking around empty rooms. It’s for these moments that the Explore music you first worked with back in Lesson 1 was composed. The deciding factor as to which music will be played will be based on if the non-player characters in the game are aware of the Wwise Wwizard's presence. This status changes constantly throughout the game as the player moves into rooms where the monsters are present and the player either disposes of them or runs out of the room to escape. The game engine communicates enemy awareness with two simple Wwise Events: Monsters_Aware and Monsters_Unaware.
The challenge is that the monster/enemy awareness can change very abruptly. One moment there’s no enemy around, so the Explore music should be heard; the next moment the Wwizard moves through a teleporter and there’s monsters everywhere, so now the Combat music should be played...but then the player defeats the monsters, so it’s back to the Explore music. Enemy awareness can toggle back and forth many times within a few seconds, so instantly switching between the Combat and Explore music every time can seem awkward. Having more control over exactly when and how the transition between Explore and Combat music requires a bit more sophistication than what can be achieved using only the features found within the Music Switch Container Association Editor. The steps you’ll use to address this situation involve a variety of concepts. It’s a good idea to get a sense of the overall approach before diving in.
You’ll first define a variety of Transition rules in the Music Playlist Container. These will provide a way for Explore and Combat music to easily slide between each in a way that allows the listener to perceive Explore and Combat music as if it were single piece of music that changes intensity with the action. Once that system is in place, the next challenge is to smooth out the timing of when the transition between the two pieces of music occurs. The key to this lies within a feature that Game Parameters have: Slew Rate. Since Game Parameters don’t directly drive the Music Switch Container Association Editor that chooses which music is played, the Game Parameter will have to be converted to a Switch Group, which can be used to pick the proper music. However, don’t forget that the information comes in the form of just two simple Events: Monsters_Aware and Monsters_Unaware. Those Events will have to be converted into an RTPC, which in turn sets the Switch in the Switch Group that allows the Music Playlist Container to pick the proper music. This may sound a bit confusing, but for now remember that the structure you’re going to build creates a flow of information that goes as follows: Event > Game Parameter > Switch Group > Music Switch Container. Now that you understand that, you need to reverse directions because it’s easiest to build this structure starting at the end and then working back to the beginning.