Difference between revisions of "03CF"
Jump to navigation
Jump to search
(Created page with "{{Icon|trilogy}} '''LOAD_MISSION_AUDIO''' <hr /> '''Description''' : Loads the mission audio '''Syntax''' : {{Icon|3}} 03CF: load_wav [''string''] : {{Icon|VC}} 03CF: load_wav...") |
|||
Line 9: | Line 9: | ||
'''Parameter''' | '''Parameter''' | ||
: [''string''] | : [''string''] | ||
− | :: Audio | + | :: Audio name, must be from a predefined but hardcoded list |
: [''int1''] | : [''int1''] | ||
:: Audio event | :: Audio event | ||
Line 15: | Line 15: | ||
:: Buffer, either 1 or 2 | :: Buffer, either 1 or 2 | ||
− | This opcode loads a wav audio generally played during missions. 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. | + | 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. A partial list of the predefined list for Vice City is [[Audio (folder, VC)|here]] under the column script name. 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 == | == Example == |
Revision as of 05:19, 2 January 2015
Description
- Loads the mission audio
Syntax
Parameter
- [string]
- Audio name, must be from a predefined but hardcoded list
- [int1]
- Audio event
- [int2]
- Buffer, either 1 or 2
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. A partial list of the predefined list for Vice City is here under the column script name. 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 using Sanny Builder, will play an air horn audio after the CAMERA key is pressed.
// 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