Wwise Unreal 2019 – Chapter 03D: Environment – Trigger A Wwise Event Via A Box Trigger

Created By: Game Audio Resource Ltd     Date: 09/11/2019      Version: 1.00

Wwise UE4: Chapter 03 D – Environment:
Trigger A Wwise Event Via A Box Trigger

In this guide we will set a simple Box Trigger to play a Wwise Event when the player character moves over or into the Box Trigger area in the map.
For this guide we will use the large shrub models we implemented in Chapter 01 to play a rustling sound when the player character moves through a dense shrub area.

TIP: This is not the most efficient way to implement this kind of multi-use process. It would be more efficient to create a more in-depth global BP process, so that all shrubs when moved through based on density size trigger an associated Wwise Event. Saving a lot of audio implementation time. A programmer could also implement a process via C++ code.


  • STEP 01: Wwise Hierarchy
  • STEP 02: Unreal Hierarchy
  • STEP 03: Unreal Level BP & Map Tagging

Download the associated free written guide:

Video Guide

Written Guide

STEP 01:
Wwise Hierarchy

First we set up the associated Wwise content needed

  1. Navigate to the Audio tab > Actor-Mixer Hierarchy > Default Work Unit > Environment Wwise Work Unit.
    Right Click, then select: New Child > Actor Mixer
    Name it: ENV_Shrub
  2. In the General Settings tab > Output Bus, assign the Environment Audio Bus
  3. Select the Actor Mixer, then in the General Settings tab > Game-Defined Auxiliary Sends, Tick the Use game-defined auxiliary sends box
  4. Right Click the Actor Mixer, then select: New Child > Random Container.
    Name it: ENV_Shrub_Rustle
  5. Drag in one-shot bush rustle audio assets into the Random Container.
    Place them under the Audio File Importer > Destination Path:
    SFX > Environment > New Folder – Shrub.
  6. Select ENV_Shrub_Rustle Random Container.
    In the Positioning tab add the following:
    Tick override parent
    Under Listener Relative Routing > 3D Spatialization, in the drop-down menu select Position + Orientation.
    Set the Speaker / Panning / 3D Spatialization Mix value to 0
    Under Attenuation assign the new ENV_Small Attenuation that we set up in Chapter 03
  7. Next, we need to create a unique Wwise event for this content to trigger.
    Right click the ENV_Shrub_Rustle Random Container, then select, New Event > Play.
  8. In the Events tab, location the new Event.
    Rename the Event to: SFX_ENV_Shrub_Rustle.
    Right click the Environment Work Unit, then select: New Child > Virtual Folder
    Name to the new Folder: ENV_Shrub
    Then move the Event into the ENV_Shrub Folder
  9. Save your Wwise Project updates & generate the Sounds Banks.
  10. Check the new Shrub content is now included in the SB_Environment Sound Bank.

STEP 02:
UE4 Hierarchy

Next, we implement the associated Unreal hierarchy content needed.

  1. Navigate to the Content Browser tab > Content > Audio > Wwise Events > Environment Folder
    Right click in the Environment folder then select: New Folder
    Name it: ENV_Shrub
    Open the new Folder
  2. Open the WwisePicker, then drag the Wwise Event: ENV_Shrub_Rustle into the new folder.
  3. Open the Event in the folder, then assign it to the Sound Bank: SB_Environment.
  4. Save the Event updates.
  5. Then generate the UE4 Sound Banks
  6. Import the Sound Bank updates via the popup message in the low right of the Unreal screen


STEP 03:
Unreal Level BP & Map Tagging

In this step we implement a Box Trigger to the map, then use BP nodes to control what Wwise Event to play when the player character moves into the box Trigger area.

  1. Open the map we set up in Chapter 01 (or the map you are working with)
  2. In the modes tab, in the search box, type: Box Trigger
    Then drag a box trigger into the map, where you want the sound Event to be triggered
  3. In the World Outliner tab list > Audio_SFX folder, right click then select: Create Sub Folder
    Name it: ENV_Triggers
  4. Drag the TriggerBox list item into the new Triggers folder.
    Then rename the TriggerBox to TRG_Shrub_Rustle_01
  5. Adjust the scale size in the details tab to match the size of your shrub area
  6. Save your map updates
    Now we will add the required BP nodes to trigger the event.
  7. Select the TRG_Shrub_Rustle_01 in the World Outliner tab
  8. In the World map toolbar click on Blueprints > then select: Open Level Blueprint
  9. Then right click in the BP graph. In the search box type: OnActorBeginOverlap.
    Then select the node from the results list.
  10. Right click the BP graph again then select: Audiokinetic > Actor > Post Event
  11. In the Post Event > Ak Event, assign the Wwise Event: ENV_Shrub_Rustle.
  12. In the World Outliner, drag in the TB_Shrub_Rustle_01 list item into the level BP graph.
    Then Connect it to the Post Event > Actor in.put
  13. Then Connect the OnActorBeginOverlap node to the Post Event node
  14. Mouse right click + hold, then drag a highlighted box around these 3 nodes. Then press C on your keyboard. Creating a comments box.
    Name the comment: SFX Trigger Bush Rustle 3D
  15. Save and compile the BP updates.
  16. Now Play the map, move the player character through the dense shrub bushes where you have placed the Box Trigger.
    You should hear the associated audio assets trigger every time you move into the Box trigger area.

You can now repeat the above process for any dense areas of shrubs the player character may move through.
Hopefully this guide will give you other ideas of different content to implement.

%d bloggers like this:
search previous next tag category expand menu location phone mail time cart zoom edit close