Sounds in GTA 2 Coding

You can create sounds for your maps and even create them mid-game, such as a bank alarm during a certain mission.

SOUND uniquename

The above command “reserves” a sound without creating it. To create it later on, add this to it:

uniquename = CREATE_SOUND ( X , Y , Z ) soundtype playtype END

Your code could look like this:

bankalarm01 = CREATE_SOUND ( 13.5 , 127.5 , 4.0 ) BANK_ALARM PLAY_FOREVER END

If you want, you can change the PLAY_FOREVER to PLAY_INSTANT to play it once. If you wish to add a sound right from the start, you'll need to add this code:

SOUND uniquename = ( X , Y , Z ) soundtype playtype

And so, your code could look like this:

SOUND prisonriot01 = ( 47.5 , 16.5 , 2.0 ) PRISON_ALARM PLAY_FOREVER

Sound Types

Below are all the sound type names in GTA 2:

Description
WINDNothing I could hear.
WATERFALLRunning water, like a stream.
CRICKETSQuite loud and very natural grasshopper noise.
JAZZ_CLUBPiano and trumpet in short loop.
STRIP_CLUBSeedy organ music.
COUNTRY_CLUBRedneck music with strong bass guitar.
NIGHT_CLUBShort loop of loud dance music.
BARLoud remix of GTA 1 convertible car radio.
CHURCH_SINGINGSavepoints use this sound.
KRISHNA_CHANTThe one from GTA 1!
TEMPLE_CHANTQuiet, slow drum beat with Krishna chant.
TEMPLE_2Loud drum with quiet chanting.
BOWLING_ALLEYSound of ball rolling and knocking over pins.
SHOPPING_MALLNothing I could hear.
CROWD_NOISENothing I could hear.
BAR_2Crowd talking with inexplicable ticking noise.
DISGRACELANDNothing I could hear.
GENERATOR_RUMBLEQuiet hum, like a substation more than a generator.
INDUSTRIAL_LOWSlightly quieter INDUSTRIAL_HIGH.
INDUSTRIAL_HIGHVery loud industrial machinery.
PYLONElectric hum in very small area.
FAN_NOISELoud fan noise covering very small area.
POWER_PLANTQuiet machinery with very deep, throbbing bass.
VATOccassional bubbles, like a huge water cooler.
WORKSHOPNothing I could hear.
PRISONNothing I could hear.
PRISON_YARDNothing I could hear.
PRISON_RIOTVery loud clattering and shouting.
PRISON_ALARM(Not tested.)
CLOCK_TOWERTicking sound, like a grandfather clock.
HUMAN_ABATTOIRVariety of ped death sounds.
GARAGE_OPENUsed with door.
GARAGE_CLOSEUsed with door.
PORTA_LOOOccassional farts? Sounded weird.
FUNNY_FARMOccassional silly laugh.
CRYINGCrying person but seemed screwed up.
SCREAMCycles through various ped screams.
SMUG_LAUGHRegular loop of the game announcer’s laugh.
LET_ME_OUTPerson shouting “LET ME OUT!”
GANG_DUMPEDSeveral people banging and shouting “LET ME OUT!”
GANG_LOCKED_IN_BUSSame as GANG_DUMPED.
DETECTED_MUMBLESeems to be screwed up.
BOMB_TICKNothing I could hear.
BOMB_TICK_SHITNothing I could hear.
YEEHA_BOMBExtremely loud and seemingly screwed up.
GENERATOR_LOSE_POWERNothing I could hear.
POISONEDScrewed up.
MUMBLE(Not tested.)
BANK_ALARM(Not tested.)
SKID(Not tested.)
ROCKET_FAIL_LAUGH(Not tested.)
ROCKET_LAUNCH_FAIL_CLICK(Not tested.)

Some of these can seem very quiet in the game while others are very loud and can be heard from far away. This means that you may have to place several sound objects in an area of your map to be able to hear the sound in the whole of that area.

Play Modes

There are only two ways to play sounds:

Description
PLAY_INSTANTOnly makes the sound once.
PLAY_FOREVERRepeats the sound until a command makes it stop.

(Originally written by Chris “Pyro” Hockley and formatted by Ben “Cerbera” Millard with full permission.)