CHAPTER 11 B – Weapon: Machine Gun

Created By: Game Audio Resource Ltd     Date: 19/08/2019      Version: 2.00

In this step we will implement content for the machine gun with unique hierarchy for a looping sound.
Also, the bullet drops will need to function differently to the shotgun / rifle bullet drops hierarchy.

Guide Steps:

  • STEP 01: Weapon Fire
  • STEP 02: Bullet Drop
  • STEP 03: Test & Integrity Report

Task Time Needed: 1 Hour


Video Guide


Written Guide 

Chapter 11 B – Step 01
Weapon Fire

We will first set up a basic hierarchy structure for the weapon fire.

HIERARCHY

  1. Navigate to the Project Explorer > Actor Mixer Hierarchy > Weapons Wwise Work Unit.
    Right click, select New Child > Actor Mixer
    Name it: Weapon_Machine_Gun
  • TIP: Note – That the Cube game lists the gun as Chain Gun
  1. With Actor Mixer selected, in the Property Editor > Output Bus, assign the following path:
    SFX > Weapon
  2. Right click the Actor Mixer, select New Child > Random Container.
    Name it: Weapon_Machine_Gun_Fire
  3. Drag in associated one-shot machine gun fire audio assets. Then place them under the path:
    SFX > Weapon > Machine_Gun

ATTENUATION

  1. Select the Random Container, then in the Property Editor > Positioning tab, add the following:
    Tick Override parent
    Under Listener Relative Routing > 3D Spatialization, in the drop-down menu select Position + Orientation
    Under Attenuation assign the following path: My Cube > Weapon > Weapon_Fire

EVENTS

  1. In the Project Explorer > Events tab > Weapon Wwise Work Unit,
    Right click, then select New Child > Virtual Folder
    Name it: Weapon_Machine_Gun
  2. Locate the following event:
    > Fire_Chaingun_Player
    Cut & paste it into the new Virtual folder.
  3. Select the event, then with the Property editor event actions displayed, navigate back to the Actor-Mixer Hierarchy > Weapon_Machine_Gun_Fire Random Container.
    Drag the Random Container onto the Event Play action line.
  4. Save your Wwise Project updates and Generate the sound banks.

Chapter 11 B – Step 02
Bullet Drop

Machine Gun bullet drops need to function differently. So we will implement a looping asset to trigger while the machine gun is being fired repeatedly.

HIERARCHY

  1. Navigate to the Project Explorer > Audio tab > Actor Mixer Hierarchy > Weapon Wwise Work Unit > Weapon_Machine_Gun Actor Mixer.
  2. Drag in a looping bullet ejecting or drop audio asset.
    Place it under SFX > Weapon > Machine Gun
  3. Select the asset, then in the Property Editor > General Settings tab, Tick the Loop Box.
  4. Click on the Advanced Settings tab, then add the following:
    Under Playback Limit:
    Tick Ignore Parent
    Tick Limit Sound Instances to:
    Change the value to 6, the change the drop down to Globally.
    Change When limit Is reached to Kill voice
    Change When priority is equal: to Discard oldest instance.
    Under Virtual Voice:
    Tick Override parent,
    Change Virtual voice behaviour: to Send to virtual voice
    Change on return to physical voice: to Play from elapsed time.
  • TIP: Due to the rapid firing of the machine gun and triggering a loop audio asset, the audible sound and game memory will quickly fill up.
    By adding the limits to what can play, we can control how much detail we want to hear.
    At the end of this chapter step, when testing the content in game, it is a good time to play around with the settings and get used to each control function for limiting sound play back of audio content.

ATTENUATION

  1. Select the audio loop asset, then in the Property Editor > Positioning tab, add the following:
    Tick Override parent
    Tick Enable Positioning
    Under Listener Relative Routing > 3D Spatialization, Change the drop-down menu to: Position + Orientation
    Under Attenuation, assign the following path:
    My Cube > Weapon > Weapon_Fire

EVENT

  1. In the Project Explorer > Events tab, locate and select the event
    Fire_Chaingun_Player
  2. In the Event Editor, right click the list select: New Action > Play.
    Select the new Event Action
  3. Add a Fade time value of 0.1
  4. Right click the list again, select: New Action > Stop > Stop.
    Select the new Event Action.
  5. Add a Delay time value of 0.4
    Add a Fade time value of 0.1
  6. Navigate back to the Actor-Mixer Hierarchy > Machine Gun Bullet drop looping asset.
    Then drag it onto the new Play and Stop event Actions.
  7. Select the event Fire_Chaingun_Player, then in the transport control press play.
    You should now hear an individual machine gun fire audio asset and the bullet drop loop audio asset play, then stop.
  8. Save your Wwise Project updates and Generate the sound banks.

At this point you could duplicate the hierarchy and batch rename Machine Gun to Mini Gun and then assign the same data to the event: Fire_Chaingun_Monster
(this is the gun used by the Rhino enemy entity)
We suggest if using the same audio assets, pitch and balance them differently to the Machine Gun assets.

Chapter 11 B – Step 03
Test & Integrity Report

We will now test our updates in game

  1. Boot up the game and connect Wwise to the game.
  2. Then in Wwise Solo the Weapon_Machine_Gun Actor Mixer
  3. Then change to the Wwise Layout Profiler.
  4. Click on the filter button, then in the Capture Log Filter window, tick Wwise Objects, then assign the following path: Actor-Mixer Hierarchy > Default Work Unit > Weapon > Weapon_Machine_Gun.
  5. Back in game, collect machine gun ammo.
  6. Change to the machine gun, with your mouse wheel.
    Now fire away!
    Test short and long bursts of gun fire work correctly.
  7. If you have also implemented the minigun, test the Rhino weapon fire in a Single Player map.
    Add any balancing changes you wish to add.
  8. Close the game.
  9. Save your Wwise Project updates and generate the Sound Banks.
  10. Finally validate your data hierarchy structures by running a Wwise Integrity Report.
%d bloggers like this:
search previous next tag category expand menu location phone mail time cart zoom edit close