Skip to content

Commit

Permalink
IEDs use playSound3D
Browse files Browse the repository at this point in the history
  • Loading branch information
Cuel committed Jan 14, 2016
1 parent 6bacd5c commit fa7a6ba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions FP_Template.VR/base/scripts/ares/ied_proximity.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ private _statement = {
[_ied] spawn {
params ["_ied"];
private _pos = getposATL _ied;
[[_ied], ["fp_iedbuzz1", "fp_iedbuzz2", "fp_iedbuzz3", "fp_iedbuzz4", "fp_iedbuzz5"] call BIS_fnc_selectRandom] call CBA_fnc_globalSay;
private _snd = (["iedbuzz1", "iedbuzz2", "iedbuzz3", "iedbuzz4", "iedbuzz5"] call BIS_fnc_selectRandom);
playSound3D [format ["fp_misc\sounds\%1.ogg", _snd], _ied, true, getpos _ied, 0.3, 1];

sleep 3.3;
deleteVehicle _ied;
("M_Titan_AT" createVehicle [_pos select 0, _pos select 1, (_pos select 2) + 0.1]) setVelocity [0, 0, -50];
Expand All @@ -50,7 +52,6 @@ private _statement = {
}, _crater, 300] call ACE_common_fnc_waitAndExecute;
};
} call ACE_common_fnc_codeToString;
if (count _args == 0) exitWith {};

private _ied = createVehicle [_className, [0, 0, 0], [], 0, "NONE"];
_ied setPosATL _pos;
Expand Down
6 changes: 3 additions & 3 deletions FP_Template.VR/xtra/ied/ied.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ if (!alive _obj) exitWith {};

_pos = getPosATL _obj;
_ammoType = "M_Titan_AT";
_buzzArray = ["fp_iedbuzz1", "fp_iedbuzz2", "fp_iedbuzz3", "fp_iedbuzz4", "fp_iedbuzz5"];
_iedSound = _buzzArray select (floor (random (count _buzzArray)));
[[_obj], _iedSound] call CBA_fnc_globalSay;
private _snd = (["iedbuzz1", "iedbuzz2", "iedbuzz3", "iedbuzz4", "iedbuzz5"] call BIS_fnc_selectRandom);
playSound3D [format ["fp_misc\sounds\%1.ogg", _snd], _obj, false, _pos, 0.3, 1];


if (alive _obj) then
{
Expand Down

0 comments on commit fa7a6ba

Please sign in to comment.