Available since Version 1.18.
Set a sound to use for the following ASF conditions:
Scope
This command should be called between calls to AddCondition and CloseCondition in a mission's initialisation script.
Syntax
hitpeds Condition
MFK
Lua
SetCondSound( sound );Game.SetCondSound( sound )- sound: The name of the daSoundResourceData to play.
insidetrigger / outsidetrigger Conditions
MFK
Lua
SetCondSound( sound, event, [time_between, start_delay] );Game.SetCondSound( sound, event, [time_between, start_delay] )- sound: The name of the daSoundResourceData to play.
- event: The event to play the sound on.
- enter_trigger: Play the sound when entering the trigger.
- inside_trigger: Play the sound when inside the trigger
- Only for "insidetrigger" conditions.
- outside_trigger: Play the sound when outside the trigger
- Only for "outsidetrigger" conditions.
- exit_trigger: Play the sound when exiting the trigger.
- time_between: The time between each time the sound plays in second
- Only for "inside_trigger" or "outside_trigger" events.
- start_delay: The delay before the sound starts playing after entering/exiting the trigger in seconds
- Only for "inside_trigger" or "outside_trigger" events.
Examples
hitpeds Condition
MFK
Lua
AddCondition("hitpeds");
AddObjSound("generic_car_explode");
CloseCondition();Game.AddCondition("hitpeds")
Game.AddObjSound("generic_car_explode")
Game.CloseCondition()insidetrigger / outsidetrigger Conditions
MFK
Lua
AddCondition("insidetrigger");
SetCondTrigger("z2phone1");
SetCondSound("enter_trigger","gag_alm2");
SetCondSound("inside_trigger","countdown_beeps",1,5);
SetCondSound("exit_trigger","P_HitByC_Mrg_01");
CloseCondition();Game.AddCondition("insidetrigger")
Game.SetCondTrigger("z2phone1")
Game.SetCondSound("enter_trigger","gag_alm2")
Game.SetCondSound("inside_trigger","countdown_beeps",1,5)
Game.SetCondSound("exit_trigger","P_HitByC_Mrg_01")
Game.CloseCondition()