03CF
- Description
- Loads the mission audio
- Syntax
- 03CF: load_wav '[string]'
- 03CF: load_wav '[string]' as [int2]
- 03CF: load_wav [int1] as [int2]
- Parameter
- [int2]
- Buffer, either 1 or 2
- [string]
- Audio name, must be from a predefined but hardcoded list
- [int1]
- Audio event
This opcode loads a wav audio generally played during missions. For GTA III and Vice City, the audio name is not based on the audio file name; it is based on a predefined list hardcoded into the game, although a vast majority of the names do match the file names. Names are not case sensitive (any upper case letters (A-Z) are converted to lower case by the game internally) and must be 7 characters or less, which is already taken care by the predefined list. In GTA III, only one audio can be loaded at a time but from Vice City and onwards more than one can be loaded. 03D0 checks if it has been loaded, 03D1 plays it, and 040D clears it.
Example
The following example for Vice City plays an air horn audio after pressing button 13 (CAMERA key).
// set constants const AUDIO = 'AIRHRNL' end while true wait 10 if 00E1: player 0 pressed_button 13 // camera key then 03CF: load_wav AUDIO as 1 while 83D0: not wav 1 loaded wait 0 end 03D1: play_wav 1 while 83D2: not wav 1 ended wait 0 end 040D: unload_wav 1 end end
Keywords
load, wav, mission, audio