Sound
Banks and events
Section titled “Banks and events”Knockout City’s sounds live in sound banks: large files holding many sounds and the rules for playing them, such as picking one of five footsteps at random or fading music in. Nothing plays a sound file directly. Things play sound events instead: named sounds that point at something inside a bank.
Each one uses the ones to its right.
- Script or levela sound to play
- Sound eventball_
hit. sound_ event - Bankthe event inside itpicks a clip, sets the volume
- Cliphit_
01 the audio - Cliphit_
02 or this one
A script plays a sound event; a level can hold one on an entity; an animation can fire one at a moment in a clip. All of them go through the same chain.
Replacing a sound
Section titled “Replacing a sound”To change what something sounds like, replace the clip inside the bank. Everything that plays that sound now plays yours, and nothing that points at it needs to change. Studio’s bank viewer lists every clip in a bank and can replace one with your own audio, or put the original back.
Adding a sound
Section titled “Adding a sound”Import an audio file (WAV, MP3, OGG, FLAC and more) into a folder in Studio, and it becomes a clip in that folder’s bank. Give it a sound event, and scripts and levels can play it by pointing at that event. The sound cookbook shows a script doing it.
Sounds are per player
Section titled “Sounds are per player”Like effects, sounds play on each player’s own game. A script that plays one has to run on every machine, or only some players hear it.
For programmers
Audio is Wwise. A script or level posts a named token; data files map it to a .sound_event, which names an event
in a bank; the bank’s hierarchy picks the media. Studio stores your edits as a patch of ops over
the shipped bank and bakes the bank on demand, so preview, test and export all get the same bank.
Where to go next
Section titled “Where to go next”Gameplay data: how the game plays.