Jump to content
Sign in to follow this  
giallustio

=BTC= Armament System

Recommended Posts

I don't get it...At the moment the AH64 has the "SidewinderLaucher_AH1Z".

Share this post


Link to post
Share on other sites
I don't get it...At the moment the AH64 has the "SidewinderLaucher_AH1Z".

Yes sir it does if you change it too this SidewinderLaucher_AH64 it will have 8 Sidewinder rockets

Thanks

Share this post


Link to post
Share on other sites

You can edit this...Every mission maker can customize the available load out, you have to know how to script a bit, but i'm here to help :D

By the way i think that the AH64 can be armed with two Sidewinder for each "wing"...but i'm not an expert, so ;)

Share this post


Link to post
Share on other sites

Giallusio - loving this script. I'm going to implement it into my mashed mission. Here is a question - AI aircraft, and how to change THEIR loadout. What I would need is the ability to change the loadout of an AI chopper/aircraft while it is in a certain area (bigger than the HeliH presently). Is this possible?

Next, are you planning on adding any other weapons? Can the system pick up information in CfgClasses as to weapons already on the server/client, and use those on the hardpoints?

What about OPFOR aircraft/helis ?

Sorry to ask so many questions but this would be just superb!

Share this post


Link to post
Share on other sites
Giallusio - loving this script. I'm going to implement it into my mashed mission. Here is a question - AI aircraft, and how to change THEIR loadout. What I would need is the ability to change the loadout of an AI chopper/aircraft while it is in a certain area (bigger than the HeliH presently). Is this possible?

What do u mean? I think you can use a radio alpha and add a check like "IF (is there any aircraft close to the H) THEN {openDialog};"...It's a little bit pointless for me because i don't play with AI but you can customize as you like, i can give you an help :)

Next, are you planning on adding any other weapons? Can the system pick up information in CfgClasses as to weapons already on the server/client, and use those on the hardpoints?

Well...To add a weapon to the dialog you have to add the weapon classname in the BTC_aircraft_Armament, so for example i want to add the "Mk82BombLauncher_6" to the second slot of the A10:

	_slot_1_1 = lbAdd [6661,"MaverickLauncher"];
_slot_1_2 = lbAdd [6661,"FFARLauncher_14"];
_slot_1_3 = lbAdd [6661,"SidewinderLaucher_AH1Z"];
_slot_1_4 = lbAdd [6661,"Mk82BombLauncher_6"];
       _slot_1_5 = lbAdd [6661,""];

lbSetCurSel [6661,_slot_1_1];

What about OPFOR aircraft/helis ?

To be honest it's a hell of work and i don't know the opfor chopper enough...You can use the existing files and adapt'em to the opfor aircrafts...

The main thing is that i don't have time and i'm working on a lot of projects at the moment. (New island, fast-roping script, MP campaign, PVP campaing etc etc)

Share this post


Link to post
Share on other sites

I have no clue on how to install this. Can someone guide me through thoroughly?

Share this post


Link to post
Share on other sites
Guest
Installation:

Copy "=BTC=Armament_System" folder in your mission folder.

Add in the init.sqf:

#include "=BTC=Armament_System\=BTC=_functions.sqf"

Add in the description.ext:

#include "=BTC=Armament_System\=BTC=_Dialog_Init.h"

Place an H on the map and call it "BTC_arm_pos".

However a demo mission is included.

Found the info in the first post. Please read provided info before asking questions.

If all still fails share the steps you took to try and make it work or upload your mission somewhere so it can be checked.

Share this post


Link to post
Share on other sites

Any help you can offer would be appreciated. I'm trying to modify the existing =BTC= Armament System for Opfor units.

While it kind of works, I am having several problems;

1. Weapons do not appear on the hard points for the aircraft (Mi24_V ie. Hind E)

2. Weapons often double up - ie. 120 80mm rockets, 12 ATGM's)

3. Cannon Pods become assigned and controlled by the gunner throught he chin mounted YakB - while very cool this is very unrealistic)

4. Oddly, the only weapons that do get aminated and rendered ont he aircraft are the two FAB-250 bombs - they however are rendered on the inside and middle pylons on the right wing, not on the inside (right and left) pylons as they should be

My coding skills are very limited and I assume I am simply missing some understanding of how ArmA assigns weapon points to named "weapons".

I've attached my code below - thanks and any help is appreciated.

This is what is set in the =BTC=_functions.sqf file;

BTC_Mi24_V_Armament =

{
_cannon_1 = lbAdd [5550,"YakB"];
_cannon_2 = lbAdd [5550,""];
lbSetValue [5550,_cannon_1,"YakB"];
lbSetValue [5550,_cannon_2,""];
lbSetCurSel [5550,_cannon_1];

_slot_1_1 = lbAdd [5551,"57mmLauncher"];
_slot_1_2 = lbAdd [5551,"ACE_S8Launcher"];
_slot_1_3 = lbAdd [5551,"ACE_UPK23"];
_slot_1_4 = lbAdd [5551,"HeliBombLauncher"];
_slot_1_5 = lbAdd [5551,""];

lbSetCurSel [5551,_slot_1_1];

_slot_2_1 = lbAdd [5552,"ACE_S8Launcher"];
_slot_2_2 = lbAdd [5552,""];

lbSetCurSel [5552,_slot_2_3];

_slot_3_1 = lbAdd [5553,"ACE_AT9Launcher_Mi28"];
_slot_3_2 = lbAdd [5553,""];

lbSetCurSel [5553,_slot_3_2];

_slot_4_1 = lbAdd [5554,"CMFlareLauncher"];
_slot_4_2 = lbAdd [5554,""];

lbSetCurSel [5554,_slot_4_1];

sliderSetRange [5555, 0, 1];
sliderSetPosition [5555, fuel BTC_vehicle];
};

BTC_Mi24_V_setArmament = 
{
BTC_rearming = true;
BTC_vehicle lock true;
_actual_fuel = fuel BTC_vehicle;
_fuel_set = sliderPosition 5555;
_fuel = (round (_fuel_set * 10)) / 10;
BTC_vehicle setFuel 0;
_weapons = BTC_vehicle weaponsTurret [0];
{BTC_vehicle removeWeapon _x} foreach _weapons;
_weapon_1 = lbText [5550,lbCurSel 5550];
_weapon_2 = lbText [5551,lbCurSel 5551];
_weapon_3 = lbText [5552,lbCurSel 5552];
_weapon_4 = lbText [5553,lbCurSel 5553];
_flares = lbText [5554,lbCurSel 5554];
closeDialog 0;
BTC_vehicle setvehicleammo 0;
sleep 1;
{
	if (!(BTC_vehicle hasWeapon _x) && _x != "") then 
	{
		hint format ["Loading %1", _x];
		sleep 2;
		BTC_vehicle addweapon _x;
		BTC_vehicle setvehicleammo 0;
	}
} foreach [_weapon_1,_weapon_2,_weapon_3,_weapon_4];
sleep 1;
{
	if (_x != "") then
	{
		hint format ["Arming %1", _x];
		sleep 3;
		_new_ammo = getArray (configFile / "CfgWeapons" / _x / "magazines");
		BTC_vehicle addMagazine (_new_ammo select 0);
	};
} foreach [_weapon_1,_weapon_2,_weapon_3,_weapon_4];
sleep 1;
if (_flares != "") then {BTC_vehicle addMagazineTurret ["120Rnd_CMFlareMagazine",[-1]];hint format ["Loading %1", _flares];sleep 2;};
if (_actual_fuel != _fuel) then
{
	for [{_n = 0}, {_n <= _fuel}, {_n = _n + 0.1}] do
	{
		hint "Refueling";
		BTC_vehicle setFuel _n;
		sleep 1;
	};
	BTC_vehicle setFuel _fuel;
} 
else {BTC_vehicle setFuel _actual_fuel;};
BTC_vehicle lock false;
BTC_vehicle = ObjNull;
hint "Your vehicle is ready!";
BTC_rearming = false;
};

As well, the script launches fine and the dialog opens normally - I've included a sample of that however just to make sure it's not something less obvious.

[spoiler]if !(_air isKindOf "A10_US_EP1" || _air isKindOf "A10" || _air isKindOf "AH64D_EP1" || _air isKindOf "AH64D" || _air isKindof "Mi24_V" || _air isKindOf "F35B" || _air isKindOf "AV8B" || _air isKindOf "AV8B2") exitWith {hint "This vehicle is not supported by the script"};

...
};		
case "Mi24_V":
{
	if (player == driver _air) then
	{
		hint "Get in as gunner to change armament!";
	};
	if (!isNull driver _air) then
	{
		hint "Driver slot must be empty!";
	};
	if (player == gunner _air && isNull driver _air) then
	{
		createDialog "Mi24_V";
	};
};[/spoiler]

Share this post


Link to post
Share on other sites

1-4) Honestly i don't know how arma handles the hard points, so i can't help you here.

2) This shouldn't happen...Maybe you load it twice.

3) You should add the weapon "yakb" to the driver's turret.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×