audio_play_id_for_character(human_name, audio_id[, type_name[, blocking[, variant[, voice_distance]]]])

Parameters:
human_name (string) name of character
audio_id (integer) ID of sound to play
type_name (string, optional) name of audio source (can be "foley", "voice", "music", or "ambient"; defaults to "foley")
blocking (boolean, optional) set to true if the function should block until the sound has finished playing (defaults to false)
variant (integer, optional) index of the specific variant of the voice line to play (or -1 for a random selection; defaults to -1)
voice_distance (integer, optional) distance that the foley can be heard from; only used for voices (0 = short, 1 = normal, 2 = long, 3 = extreme; defaults to -1, which is normal distance for peds, and extreme distance for passengers in cars)
 
Returns:
(integer) audio instance handle, or -1 on error

Description:
Play a 3D sound (by ID) on a character.
 

back to indexSR3 Script Action Documentation
Last updated: Tue, 09 Aug 2011 11:32:15