IRONFRONT FANS FORUM
Register Latest Topics
 
 
 


Reply
  Author   Comment  
Tayuk

Avatar / Picture

Admin
Registered:
Posts: 455
Reply with quote  #1 
Download: Deploy Camo Net and drop an Ammo Box

I have put together a group of scripts (Deploy and Stow, taken from Norrins Revive Script with slight modifications) that when used with an addaction on a vehicle (when your in the drivers seat only) will create a Camo Net over the vehicle and place a fully equiped ammobox for your faction under the camo net as well. The package is made up of 5 scripts.
There are 3 scripts for equiping the ammo box, one for each faction. One script to deploy and one script to stow. Basically if a German soldier deploys, then you will have German gear, if a Russian soldier  then Russian gear and obviously if a US soldier then US gear. If the vehicle is destroyed then its gone. (unless using a vehicle respawn script the keeps the init on respawn). This is intended for singleplayer and coop missions. The action menu button repeats and doesn't work properly for pvp. I am not sure how to get the 2 sides actions working independantly other than renaming the actions and the scripts for individual sides.

In the vehicles init box:-
Code:
act1 = this addAction ["Deploy","deploy_camo.sqf",[1],0,false,true,""," driver _target == _this"];


Deploy_camo.sqf
Code:

© norrin, SEPTEMBER 2010

***********************************************************************************************************************************

deploy_camo.sqf

*/

private ["_ammo_box"];

_vcl = _this select 0;

_pos_vcl = getPos _vcl;

_dir_vcl = getDir _vcl;

_camoNet = "Land_setka_car";

_ammo_box_name = "LIB_WeaponsBox_Big_GER";

switch (playerSide) do

{

case resistance: {_ammo_box = _ammo_box_name createVehicle _pos_vcl;[_ammo_box] execVM "ammoboxUS.sqf";};

case east: {_ammo_box = _ammo_box_name createVehicle _pos_vcl;[_ammo_box] execVM "ammoboxRUS.sqf";};

case west: {_ammo_box = _ammo_box_name createVehicle _pos_vcl;[_ammo_box] execVM "ammoboxGER.sqf";};

 

};

_vcl setFuel 0;

_camo = _camoNet createVehicle _pos_vcl;

_camo setDir (_dir_vcl + 90);

_camo setPos [(_pos_vcl select 0) + (sqrt (4) * cos (155 - _dir_vcl)), (_pos_vcl select 1) + (sqrt (4) * sin (155 - _dir_vcl)) , 0];

_ammo_box setDir (_dir_vcl + 90);

_ammo_box setPos [(_pos_vcl select 0) + (sqrt (14) * cos (155 - _dir_vcl)), (_pos_vcl select 1) + (sqrt (14) * sin (155 - _dir_vcl)) , 0];

camo_net = true;

publicVariable "camo_net";

_vcl removeAction act1;

act2 = _vcl addAction ["Stow","stow_camo.sqf",[1],0,false,true,""," driver _target == _this"];

if (true) exitWith {};


stow_camo.sqf

Code:

/*

STOW CAMO SCRIPT

© norrin, SEPTEMBER 2010

***********************************************************************************************************************************

stow_camo.sqf

*/

_vcl = _this select 0;

_pos_vcl = getPos _vcl;

_dir_vcl = getDir _vcl;

_ammo_crates = nearestObjects [_vcl, ["ReammoBox"], 10];

{deleteVehicle _x} forEach _ammo_crates;

_shed = nearestObject [_vcl, "House"]; //120910

deleteVehicle _shed;

_vcl setFuel 1;

camo_net = false;

publicVariable "camo_net";

camo_reset = true;

publicVariable "camo_reset";

_vcl removeAction act2;

act1 = _vcl addAction ["Deploy","deploy_camo.sqf",[1],0,false,true,""," driver _target == _this"];

if (true) exitWith {};



Now the 3 custom ammobox fillers
AmmoboxGER.sqf
Code:

_box = _this select 0;

_amountWeapon = 6;

_amountAmmo = 60;

_refreshTime = 600; // refill every 10 minutes

_box allowDamage false;

// Loop forever

while {alive _box} do

{

// Clear box

clearWeaponCargo _box;

clearMagazineCargo _box;

// Fill box with German Equipment

_box addWeaponCargo ["LIB_MP40", _amountWeapon];

_box addWeaponCargo ["LIB_M1908", _amountWeapon];

_box addWeaponCargo ["LIB_K98", _amountWeapon];

_box addWeaponCargo ["LIB_MG42", _amountWeapon];

_box addWeaponCargo ["LIB_MP44", _amountWeapon];

_box addWeaponCargo ["LIB_K98ZF39", _amountWeapon];

_box addWeaponCargo ["LIB_FLARE_PISTOL", _amountWeapon];

_box addWeaponCargo ["LIB_RPzB", _amountWeapon];

_box addWeaponCargo ["LIB_RPzB", _amountWeapon];

_box addWeaponCargo ["LIB_G43", _amountWeapon];

//Ammo

_box addMagazineCargo ["LIB_32Rnd_9x19", _amountAmmo];

_box addMagazineCargo ["lib_8rnd_9x19", _amountAmmo];

_box addMagazineCargo ["lib_5Rnd_792x57", _amountAmmo];

_box addMagazineCargo ["lib_50Rnd_792x57", _amountAmmo];

_box addMagazineCargo ["lib_30Rnd_792x33", _amountAmmo];

_box addMagazineCargo ["LIB_1Rnd_RPzB", _amountAmmo];

_box addMagazineCargo ["LIB_1Rnd_flare_yellow", _amountAmmo];

_box addMagazineCargo ["LIB_1Rnd_flare_green", _amountAmmo];

_box addMagazineCargo ["LIB_1Rnd_flare_red", _amountAmmo];

_box addMagazineCargo ["LIB_1Rnd_flare_white", _amountAmmo];

_box addMagazineCargo ["lib_10Rnd_792x57", _amountAmmo];

//Other items

_box addWeaponCargo ["LIB_Binocular_SU",_amountWeapon];

_box addWeaponCargo ["LIB_w", _amountWeapon];

_box addMagazineCargo ["LIB_Ladung_PM_MINE_mag", _amountAmmo];

_box addMagazineCargo ["LIB_Ladung_Small_MINE_mag", _amountAmmo];

_box addMagazineCargo ["LIB_Ladung_Big_MINE_mag", _amountAmmo];

_box addMagazineCargo ["LIB_PM_Provod_100", _amountAmmo];

_box addMagazineCargo ["LIB_TMI_42_MINE_mag", _amountAmmo];

_box addMagazineCargo ["lib_shg24", _amountAmmo];

_box addMagazineCargo ["SmokeShell", _amountAmmo];

 

// Wait the duration of the timer

sleep _refreshTime;

};


AmmoboxRUS.sqf
Code:

_box = _this select 0;

_amountWeapon = 6;

_amountAmmo = 60;

_refreshTime = 600; // refill every 10 minutes

_box allowDamage false;

// Loop forever

while {alive _box} do

{

// Clear box

clearWeaponCargo _box;

clearMagazineCargo _box;

// Fill box with Russian Equipment

_box addWeaponCargo ["", _amountWeapon];

_box addWeaponCargo ["", _amountWeapon];

_box addWeaponCargo ["LIB_M9130PU", _amountWeapon];

_box addWeaponCargo ["LIB_RPzB", _amountWeapon];

_box addWeaponCargo ["LIB_DP28", _amountWeapon];

_box addWeaponCargo ["LIB_M9130", _amountWeapon];

_box addWeaponCargo ["LIB_FLARE_PISTOL", _amountWeapon];

_box addWeaponCargo ["LIB_PPSh41_m", _amountWeapon];

_box addWeaponCargo ["LIB_PPSh41_d", _amountWeapon];

_box addWeaponCargo ["LIB_TT33", _amountWeapon];

//Ammo

_box addMagazineCargo ["lib_8Rnd_762x25", _amountAmmo];

_box addMagazineCargo ["lib_71Rnd_762x25", _amountAmmo];

_box addMagazineCargo ["lib_35Rnd_762x25", _amountAmmo];

_box addMagazineCargo ["lib_5Rnd_762x54", _amountAmmo];

_box addMagazineCargo ["lib_47Rnd_762x54", _amountAmmo];

_box addMagazineCargo ["LIB_1Rnd_RPzB", _amountAmmo];

_box addMagazineCargo ["LIB_1Rnd_flare_yellow", _amountAmmo];

_box addMagazineCargo ["LIB_1Rnd_flare_green", _amountAmmo];

_box addMagazineCargo ["LIB_1Rnd_flare_red", _amountAmmo];

_box addMagazineCargo ["LIB_1Rnd_flare_white", _amountAmmo];

_box addMagazineCargo ["", _amountAmmo];

//Other items

_box addWeaponCargo ["LIB_Binocular_SU",_amountWeapon];

_box addWeaponCargo ["LIB_w", _amountWeapon];

_box addMagazineCargo ["LIB_Ladung_PM_MINE_mag", _amountAmmo];

_box addMagazineCargo ["LIB_Ladung_Small_MINE_mag", _amountAmmo];

_box addMagazineCargo ["LIB_Ladung_Big_MINE_mag", _amountAmmo];

_box addMagazineCargo ["LIB_PM_Provod_100", _amountAmmo];

_box addMagazineCargo ["LIB_PM_Provod_50", _amountAmmo];

_box addMagazineCargo ["LIB_PM_Provod_75", _amountAmmo];

_box addMagazineCargo ["LIB_TMI_42_MINE_mag", _amountAmmo];

_box addMagazineCargo ["lib_shg24", _amountAmmo];

_box addMagazineCargo ["LIB_shumine_42_MINE_mag", _amountAmmo];

_box addMagazineCargo ["LIB_SMI_35_MINE_mag", _amountAmmo];

_box addMagazineCargo ["LIB_SMI_35_1_MINE_mag", _amountAmmo];

_box addMagazineCargo ["LIB_TM44_MINE_mag", _amountAmmo];

_box addMagazineCargo ["LIB_STMI_MINE_mag", _amountAmmo];

_box addMagazineCargo ["LIB_M3_MINE_mag", _amountAmmo];

_box addMagazineCargo ["LIB_PMD6_MINE_mag", _amountAmmo];

_box addMagazineCargo ["LIB_pomzec_MINE_mag", _amountAmmo];

_box addMagazineCargo ["lib_f1", _amountAmmo];

_box addMagazineCargo ["lib_rg42", _amountAmmo];

_box addMagazineCargo ["SmokeShell", _amountAmmo];

 

// Wait the duration of the timer

sleep _refreshTime;

};


ammoboxUS.sqf

Code:

_box = _this select 0;

_amountWeapon = 2;

_amountAmmo = 20;

_refreshTime = 600; // refill every 10 minutes

_box allowDamage false;

// Loop forever

while {alive _box} do

{

// Clear box

clearWeaponCargo _box;

clearMagazineCargo _box;

// Fill box with US equipment

_box addWeaponCargo ["LIB_M1_Garand", _amountWeapon];

_box addWeaponCargo ["LIB_M1_Carbine", _amountWeapon];

_box addWeaponCargo ["LIB_M1903A4_Springfield", _amountWeapon];

_box addWeaponCargo ["LIB_M1A1_Thompson", _amountWeapon];

_box addWeaponCargo ["LIB_M1918A2_BAR", _amountWeapon];

_box addWeaponCargo ["LIB_M1A1_Bazooka",_amountWeapon];

_box addWeaponCargo ["LIB_Colt_M1911", _amountWeapon];

_box addWeaponCargo ["LIB_FLARE_PISTOL", _amountWeapon];

//Ammo

_box addMagazineCargo ["LIB_8Rnd_762x63", _amountAmmo];

_box addMagazineCargo ["LIB_15Rnd_762x33", _amountAmmo];

_box addMagazineCargo ["LIB_5Rnd_762x63", _amountAmmo];

_box addMagazineCargo ["LIB_30Rnd_45ACP", _amountAmmo];

_box addMagazineCargo ["LIB_20Rnd_762x63", _amountAmmo];

_box addMagazineCargo ["LIB_1Rnd_60mm_M6", _amountAmmo];

_box addMagazineCargo ["LIB_1Rnd_flare_yellow", _amountAmmo];

_box addMagazineCargo ["LIB_1Rnd_flare_green", _amountAmmo];

_box addMagazineCargo ["LIB_1Rnd_flare_red", _amountAmmo];

_box addMagazineCargo ["LIB_1Rnd_flare_white", _amountAmmo];

_box addMagazineCargo ["LIB_7Rnd_45ACP", _amountAmmo];

//Other items

_box addWeaponCargo ["LIB_Binocular_SU",_amountWeapon];

_box addWeaponCargo ["LIB_w", _amountWeapon];

_box addMagazineCargo ["LIB_Ladung_PM_MINE_mag", _amountAmmo];

_box addMagazineCargo ["LIB_Ladung_Small_MINE_mag", _amountAmmo];

_box addMagazineCargo ["LIB_Ladung_Big_MINE_mag", _amountAmmo];

_box addMagazineCargo ["LIB_PM_Provod_100", _amountAmmo];

_box addMagazineCargo ["LIB_TMI_42_MINE_mag", _amountAmmo];

_box addMagazineCargo ["LIB_US_Mk_2", _amountAmmo];

_box addMagazineCargo ["LIB_US_M18_Red", _amountAmmo];

_box addMagazineCargo ["LIB_US_M18_Green", _amountAmmo];

_box addMagazineCargo ["LIB_US_M18_Yellow", _amountAmmo];

_box addMagazineCargo ["LIB_US_M18", _amountAmmo];

_box addMagazineCargo ["PIPEBOMB", _amountAmmo];

// Wait the duration of the timer

sleep _refreshTime;

 

};

 

 

0
Gunter Severloh

Avatar / Picture

Admin
Registered:
Posts: 2,749
Reply with quote  #2 
Script is now hosted on the MR, readme included, link for download added to the first post.
__________________
0
Foxsch

Avatar / Picture

Colonel
Registered:
Posts: 454
Reply with quote  #3 
Is there an ARMA 3 version of this anywhere anybody know?
I tried using it as specified but drew a blank - something isn't firing in A3.
The most similar is 'Deployable Camo Nets' which is also for A2 AND unfortunately, a @MOD; which would add confusion for Editors and Players alike.
I prefer the option of dropping the IFA2/3 ammoboxes with the Net?
How are permissions to adapt this for ARMA 3? 

__________________
Mission Repository - http://www.missionrepository.com

0
Tayuk

Avatar / Picture

Admin
Registered:
Posts: 455
Reply with quote  #4 
As far as I know, there are no permissions required, I adapted the above from stuff that was already out there and just put it together, so feel free to play and getting it working in A3. Unfortunately I have never played IF in Arma 3 so can't help. Currently no working gaming pc at all [frown] .
0
Chief

Sergeant
Registered:
Posts: 115
Reply with quote  #5 
Quote:
Originally Posted by Tayuk
As far as I know, there are no permissions required, I adapted the above from stuff that was already out there and just put it together, so feel free to play and getting it working in A3. Unfortunately I have never played IF in Arma 3 so can't help. Currently no working gaming pc at all [frown] .


Have you taken up sport in lieu of no gaming PC  then Tay?[wink]
0
Foxsch

Avatar / Picture

Colonel
Registered:
Posts: 454
Reply with quote  #6 
No PC? - No Gaming? No IFA3!!!? Doesn't bear thinking about...
I would like to adapt it for A3 but I wouldn't know where to start looking for the port changes - 

__________________
Mission Repository - http://www.missionrepository.com

0
Tayuk

Avatar / Picture

Admin
Registered:
Posts: 455
Reply with quote  #7 
I now have a new very capable PC, have re-purchased Iron Front (now steam version) and have A3, just got to get my head round the conversion, so may take a look myself when I get my act together [smile]
0
Foxsch

Avatar / Picture

Colonel
Registered:
Posts: 454
Reply with quote  #8 
[thumb]  That would be excellent Tayuk ~ Yes Please : -)
__________________
Mission Repository - http://www.missionrepository.com

0
Tayuk

Avatar / Picture

Admin
Registered:
Posts: 455
Reply with quote  #9 
I have just tested it in the Arma 3 editor and it worked without any changes at all.

Download this demo to see it working on Stratis [smile]

https://www.mediafire.com/?zdffz53vz4pp1i7






0
Foxsch

Avatar / Picture

Colonel
Registered:
Posts: 454
Reply with quote  #10 
Excellent : -)

  Thank You Tayuk [comp]

__________________
Mission Repository - http://www.missionrepository.com

0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.