audio_object_post_event(event_name, switch_group_name, switch_name[, object_name[, play_for_client]])

Parameters:
event_name (string) name of the audio event
switch_group_name (string(s) , optional) name of a single switch group (or a Lua table of switch group strings)
switch_name (string(s) , optional) name of a single switch (or a Lua table of switch strings)
object_name (string, optional) play audio event at this object's position (only attaches to vehicles or emitters)
play_for_client (bool, optional) assumed to be true - if true, play on client machine as well
 
Returns:
(int) the play_id returned by the posting of the event

Description:
Post an audio event, optionally on an object (currently only attaches to vehicles) with a switch. The switch parameters are optional depending on the audio event you are playing. If an object name is given, the event will play at the object's current position. Only attaching object's to vehicles, is currently supported.
 

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