ACE3/addons/fcs/functions/fnc_handleAirBurstAmmunitionPFH.sqf

25 lines
688 B
Plaintext
Raw Normal View History

2015-02-14 06:51:13 +00:00
// by commy2
2015-05-13 03:15:52 +00:00
#include "script_component.hpp"
private ["_vehicle", "_projectile", "_zeroing", "_position", "_subMunition"];
2015-02-14 06:51:13 +00:00
_vehicle = _this select 0 select 0;
_projectile = _this select 0 select 1;
_zeroing = _this select 0 select 2;
if (isNull _projectile || {!alive _projectile}) exitWith {
[_this select 1] call CBA_fnc_removePerFrameHandler;
2015-02-14 06:51:13 +00:00
};
if (_projectile distance _vehicle < _zeroing) exitWith {};
_position = getPosATL _projectile;
_subMunition = createVehicle ["ACE_B_35mm_ABM_Helper", _position, [], 0, "FLY"];
_subMunition setPosATL _position;
_subMunition setVelocity [0, 0, -10];
deleteVehicle _projectile;
[_this select 1] call CBA_fnc_removePerFrameHandler;