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 {
|
2015-04-06 16:22:43 +00:00
|
|
|
[_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;
|