Lesson 7

Table of Contents

Creating Events for Enemy Awareness

For Cube, the status of the enemies’ awareness is communicated to Wwise using two Events: Monsters_Aware and Monsters_Unaware. The final step is to link these Events to the EnemyAware Game Parameter. Events can be used to set Game Parameter values in a way similar to how you’ve used them to set States.

  1. In the Project Explorer, click the Events tab and, in the Music Work Unit, create a new Event called Monsters_Aware.

    When the monsters are aware, you want the RTPC value to rise to 100.

  2. In the Event Property Editor, click the Add>> button and choose Game Parameter > Set Game Parameter.

  3. To add the Delay column to the Event Property Editor, right-click the table header and click Configure Columns.

  4. In the Object Property Settings dialog box that opens, expand Events. Select the Delay check box and then click OK.

    The Delay column is now displayed.

    Now you need to assign which Game Parameter should be set.

  5. In the Project Explorer, click the Game Syncs tab and drag the EnemyAware Game Parameter to the empty box in the Target column.

  6. Select the first line in the Event Property Editor and then use the disclosure triangle to expand the right pane in order to set the Game Parameter Value property to 100.

    Now you need a Monsters_Unaware Event to use for setting the EnemyAware Game Parameter to 0.

  7. Repeat steps 1 to 4 but create an Event called Monsters_Unaware that sets the EnemyAware Game Parameter Value property to 0.

    Usually, the only time the Wwizard is defeated is when he's fighting monsters, so the Combat music will most likely be playing at that time. It’s possible that when the player re-spawns that the Combat music will momentarily play before transitioning to the Explore music that would normally be heard at the beginning of the game level. This is because of the slew rate you’ve configured for the EnemyAware Game Parameter. You can use the Set Game Parameter Action to immediately force the EnemyAware value back down to 0 so that when the player re-spawns, the correct music will always be heard.

  8. In the Event Viewer, choose the Defeated_Player Event.

    Just as you've set other Game Parameter values, you'll set the EnemyAware Game Parameter Value property to 0 when the player is defeated.

  9. Add an Action to set the EnemyAware Game Parameter to a value of 0.

    The key is to force the value down to 0 immediately, but not before the transition to the Defeated music is complete. To ensure this is the case, you'll put a half second delay on the action. In addition, you'll use the Bypass Game Parameter Interpolation check box to indicate that in this case the slew rate value you defined earlier should be ignored and the value should immediately go to 0 once the half second delay has passed.

  10. Change the Action's delay property to 0.5 and click the Bypass Game Parameter Interpolation check box.

    Now you need to test that your Events are working by adding them to the Music Testing Soundcaster Session.

  11. In the main menu, choose Views > Soundcaster and then drag the Events you just created into the Music Testing Soundcaster Session.

  12. Play the Music Event and then play the Monsters_Aware and Monsters_Unaware Events.

    When the Monsters_Aware and Monsters_Unaware Events are received, the music may not instantly change because of the Slew Rate you’ve configured.


Was this page helpful?