1+ /*
2+ File: ammobox.sqf
3+
4+ Author: Kibot
5+
6+ Description:
7+ Air-deploys a NATO ammobox with a parachute at a assigned location.
8+
9+ Parameter(s):
10+ _this select 0 - OBJECT - A non-nil object with a physical location.
11+
12+ Usage:
13+ _scriptHandle = [player] execVM 'ammobox.sqf';
14+
15+ Returns:
16+ - Nil -
17+ */
18+
119_target = _this select 0 ;
220
321_location = getpos _target ;
422
5- if (commandpointsblu1< 2 ) exitWith
6- {
23+ if (commandpointsblu1< 2 ) exitWith {
724 [" 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 your location" ;
1330
31+ // Create the parachute
1432_parachute = " Steerable_Parachute_F" CreateVehicle _location ;
1533_parachute setPos [_location select 0 , _location select 1 , (_location select 2 )+ 100 ];
16-
34+ // Create the supply crate
1735_ammo = " B_supplyCrate_F" CreateVehicle [_location select 0 ,_location select 1 ,(_location select 2 )+ 50 ];
1836_ammo attachTo [_parachute ,[0 ,0 ,0 ]];
1937
@@ -34,10 +52,6 @@ _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 ;};
3654
37-
38- // 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"};
39-
40-
4155waitUntil {sleep 1 ; getpos _ammo select 2 < 0.2 };
4256_smoke = " SmokeShellGreen" CreateVehicle (getpos _ammo );
4357[" info" ,[" Supply delivered" ," The supply crate has been marked with green smokes" ]] call bis_fnc_showNotification ;
0 commit comments