Created By: Game Audio Resource Ltd Date: 09/11/2019 Version: 1.00
Wwise UE4: Chapter 05 A – Weapon:
Shotgun Fire
In this guide we set up Wwise to trigger Gun Fire audio assets.
We will then modify the associated BP node to use the correct AK node.
GUIDE STEPS:
- STEP 01: Wwise Hierarchy
- STEP 02: Unreal Hierarchy
- STEP 03: Unreal Blueprint
Download the free associated written guide:
Wwise_Unreal_Chapter_05A_Weapon_Shotgun_Fire
Video Guide
Written Guide
STEP 01:
Wwise Hierarchy
First, we set up Wwise with the associated shotgun fire content
- Navigate to the: Audio tab > Actor-Mixer Hierarchy > Default Work Unit > Weapon Work Unit
Right Click, then select: New Child > Actor Mixer
Name it: WEP_Shotgun - With the Actor Mixer selected, in the Property Editor > General Settings tab > Output Bus, Drag in the Master-Mixer Weapon Audio Bus
- In the General Settings tab, under Game-Defined auxiliary sends, tick the Use game-defined auxiliary sends tick box.
– TIP: This will enable the reverb FX zones we implemented in Chapter 03 to affect the Shotgun Fire content. - Right Click the Actor Mixer, then select: New Child > Random Container
Name it: WEP_SHG_Fire - Drag in associated one-shot shotgun fire audio assets.
Place them under the File Importer Destination Path:
SFX > New Folder – Weapon > New Folder – Shotgun - Right click the Random Container, then select: New Event > Play
- Navigate to the Events tab > Default Work Unit > Weapon Work Unit.
Right click, then select: New Child > Virtual Folder.
Name it: WEP_Shotgun - Drag the new shotgun Fire event into the new Virtual Folder.
- Change the Event name to: SFX_WEP_SHG_Fire
- Save the Wwise Project updates and generate the Wwise Sound Banks
- Check the Shotgun Fire assets have been included in the SB_Weapon Sound Bank.
STEP 02:
Unreal Hierarchy
Next, we set up Unreal data with the new Wwise associated shotgun fire content
- Navigate to the Content Browser > Content > Audio > Wwise_Event > Weapon Folder.
In the folder, right click, then select: New Folder
Name it: WEP_Shotgun - Open the Wwise Picker
The drag in the SFX_WEP_SHG_Fire Event into the new Shotgun Folder. - Double click the Event, then assign it to the SB_Weapon Sound Bank.
- Save the Event update.
- Generate the Unreal Sounds Banks.
STEP 03:
Unreal BluePrint
Next, we need to update the associated BluePrint to use an AK Node, instead of the currently assigned Unreal audio engine node, so that the shotgun fire is called in game by Wwise.
- First, we need to know where the UE4 audio event is currently assigned.
Navigate to the Content Editor > Content > FirstPerson > Audio Folder.
Right Click the FirstPersonTemplateWeaponFire02 wavefile, then select: Reference Viewer.
In the New Window we can see it is assigned to the FirstPersonCharacter BluePrint.
Right click the FirstPersonCharacter node, then select: Browse to Asset - Double click the FirstPersonCharacter Blueprint.
In the Find Results tab, in the search box, type: FirstPersonTemplateWeaponFire02 - Double click any of the 3 search results to centre the screen on the Node.
Select the Play Sound at Location node, then delete it (Keyboard Delete) - Right Click the Event Graph, then select: Audiokinetic > Post Event at Location
Re-join the lines to the SpawnActor First Person Projectile & the GetActorLocation nodes - In the Post Event at Location node > Ak Event, in the drop-down menu change it to the new Wwise Event: SFX_WEP_SHG_Fire
- Add a note to the node stating Play Gun Fire Event
- Compile the Blue Print
- Then save the Blue Print update.
- Close the Blue Print.
- Launch the map, then fire the shotgun.
You should now hear the new shotgun fire audio assets.
If you make any further balancing updates, remember to save your Wwise Project updates.
Then generate the sound banks in Wwise & Unreal.