Skip to content

Commit

Permalink
migrate to ACE suicide bomber system
Browse files Browse the repository at this point in the history
([_suicider] call ace_common_fnc_isAwake) this check will be useless  if this is accepted acemod/ACE3#6324
  • Loading branch information
Vdauphin committed May 4, 2018
1 parent 4ad3546 commit dc70503
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
16 changes: 6 additions & 10 deletions =BTC=co@30_Hearts_and_Minds.Altis/core/fnc/ied/allahu_akbar.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,10 @@ private _soundToPlay = _soundPath + "core\sounds\allahu_akbar.ogg";
if (alive _suicider && [_suicider] call ace_common_fnc_isAwake) then {
playSound3d [_soundToPlay, _suicider, false, getPosASL _suicider, 40, random [0.9, 1, 1.2], 100];
};
if ([_suicider] call ace_common_fnc_isAwake) then {
[{
params ["_suicider"];

[{
params ["_suicider"];

if (alive _suicider && [_suicider] call ace_common_fnc_isAwake) then {
{deleteVehicle _x;} forEach attachedObjects _suicider;
(getPos _suicider) params ["_x", "_y", "_z"];
"Bo_GBU12_LGB_MI10" createVehicle [_x, _y, 0.1 + _z];
[_pos] call btc_fnc_deaf_earringing;
};
}, [_suicider], 1.4] call CBA_fnc_waitAndExecute;
[_suicider, btc_player_side, 10, selectRandom [0, 1, 2], false] call ace_zeus_fnc_moduleSuicideBomber;
}, [_suicider], 1.4] call CBA_fnc_waitAndExecute;
};
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ _expl3 attachTo [_suicider, [0.1, 0.1, 0.15], "Pelvis"];

[_expl1, _expl2, _expl3] remoteExec ["btc_fnc_ied_belt", 0];

_suicider addEventHandler ["Killed", {
params ["_unit", "_killer"];

if !(isPlayer _killer) then {
[_unit] call btc_fnc_detachObjects;
};
}];

(group _suicider) setBehaviour "CARELESS";
(group _suicider) setSpeedMode "FULL";

Expand Down

0 comments on commit dc70503

Please sign in to comment.