1- _target = _this select 0 ;
1+ /*
2+ File: fob_ammobox.sqf
3+
4+ Author: Kibot
5+
6+ Description:
7+ Variant of ammobox.sqf with less spread in deployment.
8+ Air-deploys a NATO ammobox with a parachute at a assigned location.
9+
10+ Parameter(s):
11+ _this select 0 - OBJECT - A non-nil object with a physical location.
212
13+ Usage:
14+ _scriptHandle = [player] execVM 'fob_ammobox.sqf';
15+
16+ Returns:
17+ - Nil -
18+ */
19+
20+ _target = _this select 0 ;
321_location = getpos _target ;
422
5- if (commandpointsblu1< 2 ) exitWith
6- {
7- [" info" ,[" Not enough command points" ," Not enough Command Points (2CP required)" ]] call bis_fnc_showNotification ;
23+ if (commandpointsblu1< 2 ) exitWith {
24+ [" info" ,[" Not enough command points" ," Not enough Command Points (2CP required)" ]] call bis_fnc_showNotification ;
825};
926commandpointsblu1 = commandpointsblu1 - 2 ;
1027publicVariable " commandpointsblu1" ;
1128
1229hint " A supply crate has been dropped near the FOB" ;
1330
31+ // Create the parachute
1432_parachute = " Steerable_Parachute_F" CreateVehicle _location ;
1533_parachute setPos [_location select 0 , _location select 1 , (_location select 2 )+ 50 ];
16-
34+ // Create the supply crate
1735_ammo = " B_supplyCrate_F" CreateVehicle [_location select 0 ,_location select 1 ,(_location select 2 )+ 20 ];
1836_ammo attachTo [_parachute ,[0 ,0 ,0 ]];
1937
@@ -33,10 +51,7 @@ _ammo addMagazineCargo ["Chemlight_green", 70];
3351_ammo addBackpackCargo [" B_AssaultPack_khk" ,10 ];
3452
3553if (support_armory_available) then {[[_ammo ,[" <t color='#ff1111'>Armory</t>" ," bisArsenal.sqf" ,[], 0 , false , false , " " , " _this distance _target < 4" ]]," addAction" ,true ,true ] call BIS_fnc_MP ;};
36-
37- // magazines[] = {"1Rnd_HE_Grenade_shell","UGL_FlareWhite_F","UGL_FlareGreen_F","UGL_FlareRed_F","UGL_FlareYellow_F","UGL_FlareCIR_F","1Rnd_Smoke_Grenade_shell","1Rnd_SmokeRed_Grenade_shell","1Rnd_SmokeGreen_Grenade_shell","1Rnd_SmokeYellow_Grenade_shell","1Rnd_SmokePurple_Grenade_shell","1Rnd_SmokeBlue_Grenade_shell","1Rnd_SmokeOrange_Grenade_shell","3Rnd_HE_Grenade_shell","3Rnd_UGL_FlareWhite_F","3Rnd_UGL_FlareGreen_F","3Rnd_UGL_FlareRed_F","3Rnd_UGL_FlareYellow_F","3Rnd_UGL_FlareCIR_F","3Rnd_Smoke_Grenade_shell","3Rnd_SmokeRed_Grenade_shell","3Rnd_SmokeGreen_Grenade_shell","3Rnd_SmokeYellow_Grenade_shell","3Rnd_SmokePurple_Grenade_shell","3Rnd_SmokeBlue_Grenade_shell","3Rnd_SmokeOrange_Grenade_shell"};
3854
39-
4055waitUntil {sleep 1 ; getpos _ammo select 2 < 0.2 };
4156_smoke = " SmokeShellGreen" CreateVehicle (getpos _ammo );
4257[" info" ,[" Supply delivered" ," The supply crate has been marked with green smokes" ]] call bis_fnc_showNotification ;
0 commit comments