Jump to content
geloxo

Adding firing from vehicles feature to existing addons

Recommended Posts

Hi,

I´m not sure if this has been documented completely yet (indeed there are other posts discussing it under this section like http://forums.bistudio.com/showthread.php?186260-FFV-GunnerActions) so just in case here we go... Probably we are wrong but this worked for us. Please feel free to correct us if we are wrong. Thanks to our UST101 parter Maur we tested this feature with existing models quite easily. The process indeed does only need a few tweaks on config and no modification to 3D model (provided it already had cargo proxies as usual):

1. Firing from vehicles sets those positions as extra "gunner" turrets, meaning that you either have to add new proxies to the model or just convert existing cargo positions in those new proxies. Therefore if your original model had 6 cargo positions and you want to convert 4 of them to be used as firing ones then you have to remove 4 slots from the cargo proxy and use them as 4 new slots for the firing feature. Example:

The original model had 6 cargo positions, as follows:

transportSoldier = 6; (total cargo of 6 people)

cargo indexes --> 1,2,3,4,5,6

Then if in your new config you want to use positions 1 to 4 as firing ones you must have in your new config a total cargo of 2 people only (they will be the standard "ride in back" cargo) and they will use the original slots 5 and 6:

		transportSoldier = 2;
	cargoProxyIndexes[] = {5,6};

If you don´t do that you will have duplicated positions and the soldiers will be one on top of the other at those positions.

2. Add the cargo turrets class to the old config. Using the littlebird config entries as a reference:

class Turrets: Turrets
{
	class CargoTurret_01: CargoTurret
{
			gunnerGetInAction = "GetInLOW";     // <-- animation for entry in the turret
			gunnerGetOutAction = "GetOutLOW";
			gunnerAction = "passenger_bench_1";     // <-- action while operating the turret
			gunnerCompartments = "Compartment2";     // <-- cargo compartment existing on the original model
			memoryPointsGetInGunner = "pos gunner";     // <-- memory point to allow the getin action (can be anyone existing on the model of your choice)
			memoryPointsGetInGunnerDir = "pos gunner dir";
			gunnerName = "$STR_A3_TURRETS_BENCH_L2";    // <-- the displayed name for that turret in the vehicle actions
			proxyIndex = 1;     // <-- original cargo index that we are converting to new turret for firing
			maxElev = 45;     // <-- elevation and rotation limits for the new turret
			minElev = -45;
			maxTurn = 65;
			minTurn = -95;
			isPersonTurret = 1;     // <-- enables the feature
			ejectDeadGunner = 0;
			class dynamicViewLimits
			{
				CargoTurret_04[] = {-65,95};     // <-- viewlimits
			};
			playerPosition = 4;
			soundAttenuationTurret = "";
			disableSoundAttenuation = 1;
};
class CargoTurret_02: CargoTurret_01
{
			gunnerCompartments = "Compartment3";
			memoryPointsGetInGunner = "pos gunner_2";
			memoryPointsGetInGunnerDir = "pos gunner dir_2";
			gunnerName = "$STR_A3_TURRETS_BENCH_R1";
			proxyIndex = 2;
			maxElev = 45;
			minElev = -45;
			maxTurn = 85;
			minTurn = -65;
			class dynamicViewLimits
			{
				CargoTurret_03[] = {-65,85};
			};
};
class CargoTurret_03: CargoTurret_02
{
			gunnerCompartments = "Compartment3";
			gunnerName = "$STR_A3_TURRETS_BENCH_L1";
			memoryPointsGetInGunner = "pos gunner";
			memoryPointsGetInGunnerDir = "pos gunner dir";
			proxyIndex = 3;
			maxElev = 45;
			minElev = -45;
			maxTurn = 65;
			minTurn = -85;
			class dynamicViewLimits
			{
				CargoTurret_03[] = {-85,65};
			};
};
class CargoTurret_04: CargoTurret_01
{
			gunnerCompartments = "Compartment2";
			gunnerName = "$STR_A3_TURRETS_BENCH_R2";
			memoryPointsGetInGunner = "pos gunner_2";
			memoryPointsGetInGunnerDir = "pos gunner dir_2";
			proxyIndex = 4;
			maxElev = 45;
			minElev = -45;
			maxTurn = 95;
			minTurn = -65;
			class dynamicViewLimits
			{
				CargoTurret_01[] = {-95,65};
			};
};
};

Notice that we have assigned as proxyIndex the old cargoindex (1, 2, 3 and 4) that the original model had. The other numerical values define the moving angle and elevation limits for the soldier operation from that newly created firing from vehicle turret (cargoturret).

3. Add the needed cargoturret class to config. For example, for an Arma2 helicopter class based model (the simplified config is shown):

class CfgVehicles
{
class Helicopter
{
	class CargoTurret;     // <-- new entry
	class Turrets
	{
		class NewTurret; // <--- typically used for original gunners turrets
	};
};

     // ............ rest of your addon config

};

So simple indeed. I hope you find it useful with your existing projects ;)

Edited by geloxo

Share this post


Link to post
Share on other sites

Sorry to dig this up after so much time.

What does "class dynamicViewLimits" do?

I noticed the number changes for every turret, how am i supposed to change this for every ffv seat?

---------- Post added at 04:13 PM ---------- Previous post was at 02:53 PM ----------

Nevermind, i found out what it does:

http://dev.arma3.com/post/oprep-firing-from-vehicles

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

×