Sounds in GTA 2 Mission Scripts
You can add ambient sounds for your maps and even create sound effects for your missions. Ambient sounds include music coming out of a club or machinery noise in an industrial area. Sound effects include setting off a bank alarm during a mission.
See also: Messages which Play a Sound
Ambient Sound Example
To add a sound right from the start, you’ll need to add this code:
SOUND name = (X,Y,Z) SOUNDTYPE PLAYTYPE
And so, your code could look like this:
SOUND club01 = (47.5,16.5,2.0) STRIP_CLUB PLAY_FOREVER
Mission Sound Effect Example
This command “reserves” a sound without creating it:
SOUND name
To create the sound effect, add this to it:
name = CREATE_SOUND (X,Y,Z) SOUNDTYPE PLAYTYPE END
Your code could look like this:
SOUND bankalarm01
LEVELSTART
bankalarm01 = CREATE_SOUND (13.5,127.5,4.0) BANK_ALARM PLAY_FOREVER END
When the mission has finished, use DELETE_ITEM
to turn off the sound:
DELETE_ITEM (bankalarm01)
You can make the sound play just once, such as a door opening or a character shouting. Simply change the PLAY_FOREVER
to PLAY_INSTANT
:
bankalarm01 = CREATE_SOUND (13.5,127.5,4.0) DOOR_OPEN PLAY_INSTANT END
Sound Types
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.
Description | |
---|---|
WIND | Nothing I could hear. |
WATERFALL | Running water, like a stream. |
CRICKETS | Quite loud and very natural grasshopper noise. |
JAZZ_CLUB | Piano and trumpet in short loop. |
STRIP_CLUB | Seedy organ music. |
COUNTRY_CLUB | Redneck music with strong bass guitar. |
NIGHT_CLUB | Short loop of loud dance music. |
BAR | Loud remix of GTA 1 convertible car radio. |
CHURCH_SINGING | Savepoints use this sound. |
KRISHNA_CHANT | The one from GTA 1! |
TEMPLE_CHANT | Quiet, slow drum beat with Krishna chant. |
TEMPLE_2 | Loud drum with quiet chanting. |
BOWLING_ALLEY | Sound of ball rolling and knocking over pins. |
SHOPPING_MALL | Nothing I could hear. |
CROWD_NOISE | Nothing I could hear. |
BAR_2 | Crowd talking with inexplicable ticking noise. |
DISGRACELAND | Nothing I could hear. |
GENERATOR_RUMBLE | Quiet hum, like a substation more than a generator. |
INDUSTRIAL_LOW | Slightly quieter INDUSTRIAL_HIGH .
|
INDUSTRIAL_HIGH | Very loud industrial machinery. |
PYLON | Electric hum in very small area. |
FAN_NOISE | Loud fan noise covering very small area. |
POWER_PLANT | Quiet machinery with very deep, throbbing bass. |
VAT | Occassional bubbles, like a huge water cooler. |
WORKSHOP | Nothing I could hear. |
PRISON | Nothing I could hear. |
PRISON_YARD | Nothing I could hear. |
PRISON_RIOT | Very loud clattering and shouting. |
PRISON_ALARM | (Not tested.) |
CLOCK_TOWER | Ticking sound, like a grandfather clock. |
HUMAN_ABATTOIR | Variety of ped death sounds. |
GARAGE_OPEN | Sound like a DOOR .
|
GARAGE_CLOSE | Sound like a DOOR .
|
PORTA_LOO | Occassional farts? Sounded weird. |
FUNNY_FARM | Occassional silly laugh. |
CRYING | Crying person but seemed screwed up. |
SCREAM | Cycles through various ped screams. |
SMUG_LAUGH | Regular loop of the game announcer’s laugh. |
LET_ME_OUT | Person shouting “LET ME OUT!” |
GANG_DUMPED | Several people banging and shouting “LET ME OUT!” |
GANG_LOCKED_IN_BUS | Same as GANG_DUMPED .
|
DETECTED_MUMBLE | Seems to be screwed up. |
BOMB_TICK | Nothing I could hear. |
BOMB_TICK_SHIT | Nothing I could hear. |
YEEHA_BOMB | Extremely loud and seemingly screwed up. |
GENERATOR_LOSE_POWER | Nothing I could hear. |
POISONED | Screwed up. |
MUMBLE | (Not tested.) |
BANK_ALARM | (Not tested.) |
SKID | (Not tested.) |
ROCKET_FAIL_LAUGH | (Not tested.) |
ROCKET_LAUNCH_FAIL_CLICK | (Not tested.) |
There are only two ways to play sounds:
PLAY_INSTANT
| Only makes the sound once. |
---|---|
PLAY_FOREVER
| Repeats the sound until a command makes it stop. |
(Originally written by Chris “Pyro” Hockley and formatted by Ben “Cerbera” Millard with full permission.)