Lesson 6

Table of Contents

Configuring Paths with Multiple States

Now you’re ready to configure the Wwise 201 Music Music Switch Container so that the type of music it plays is based on changes in the Music_State State Group. The approach is similar to what you’ve already done with the PlayerLife State Group.

  1. In the Project Explorer, click the Audio tab and select the Wwise 201 Music Music Switch Container.

  2. Click the [>>] selector button in the Music Switch Container Association Editor and choose State Groups > Music > Music_State.

    A new column appears to the right of the PlayerLife column.

    Instead of dragging the Music Playlist Containers to their respective Music Mode States, you have to consider that things are a bit more involved because the status of both State Groups needs to be taken into consideration by the Music Switch Container. For example, is there different music for when the player is alive and fighting the boss versus when the player is defeated while fighting the boss? All of the various circumstantial combinations can be accounted for by creating paths for each unique scenario.

    To define what happens given a situation, you can select one State for each of the State Group columns and then create a unique Path for that particular combination. For example, you know that when the player is alive and in the boss fight, you want to hear the Boss Music Playlist Container.

  3. For the PlayerLife column, select Alive. For the Music_State column, select Boss.

    Now you can add a Path for what happens when the player is alive while fighting the boss.

  4. Click the Add Path(s) button.

    In the lower section of the Music Switch Container Association Editor, you see the new Path is created.

    The new Path says Alive.Boss. The period connecting Alive and Boss is used here to denote the separation between the two columns. Because Alive comes first, this means that the State comes from the first column’s State Group, which in this case is PlayerLife. Boss comes second, meaning that the State comes from the Music_State. You see that the paths you created earlier for the Alive and Defeated states now say Alive.* and Defeated.*. The “*” symbolizes a wildcard value, meaning that the condition of the State in the related column does not matter.

    Currently there’s no association with the Alive.Boss path so you need to indicate which object should play when these conditions are met.

  5. Drag the Boss Music Playlist Container from the Project Explorer to the Object column for the new Path.

    Now you’ll create another Path for when the player is alive and finishes the level, but this time you’ll take a small shortcut in creating that Path.

  6. Keeping Alive selected in the first column, drag the Victory Music Playlist Container to the Victory State.

    You see that a new Alive.Victory Path is automatically created with the correct Victory Music Playlist Container already associated.

  7. In the same way, drag the Story Music Playlist Container to Story.

    You don’t have a specific Music Playlist Container for Gameplay, but for this lesson you’ll associate it with the Combat Music.

  8. Drag the Combat Music Playlist Container to Gameplay.

    [Note]

    You’ll integrate the Explore music into the project in the next lesson.

    A new Path is added for Alive.Gameplay.

    [Tip]

    Selecting a State Group’s column header signifies that the condition of the State Group doesn’t matter and a wildcard will be used when the Path is created.

    Now you’re ready to test your configuration.

  9. Play the Music Event and experiment with changing both the PlayerLife and Music_State State Groups in the Transport Control view. You hear the transitions occur at the next bar because of the default Any to Any Transition rule you modified earlier in the lesson.


Was this page helpful?