Jump to content
citazenman

TransportSoldier Config Entry Problem

Recommended Posts

Hello and thank you for reading,

 

I am currently working on a decently large project that included an extraction script. The script is supposed to send a helicopter with a sufficient amount of seats to pickup a group. However, since the introduction of firing from vehicles, there is an issue. The config entry "TransportSoldier" no longer represents a real amount of passenger seats in a vehicle. The entry only accounts for seats where FFV is unavailable. This makes it impossible for my script to ever use the MH-9 or many of the RHS vehicles because they use a lot of ffv slots.

 

I'll give an example below:

if ( (getNumber(_vehicle >> "transportSoldier")) >= (count (units _extractGroup)) ) then {extractNames = extractNames + [configName _vehicle]}; //The MH-9 only has 2 non FFV seats so it is almost never in the array

I am aware that there is already a ticket open for this but it is getting little attention and I doubt this is a priority at all for the Devs right now. http://feedback.arma3.com/view.php?id=21602

 

Thank you in advance if anyone can think of a work around for this that doesn't involve spawning each vehicle and using emptyPositions.

 

 

 

Share this post


Link to post
Share on other sites

So you're saying BIS_fnc_getTurrets cannot get only the FFV turrets, so you cannot just add "transportSoldier" and BIS_fnc_getTurrets FFV results?

 

You can do this with my scripting library and framework (link in my sig):

((getNumber (_vehicle >> "transportSoldier")) + (count ([_vehicle, "CargoFFV"] call Zen_GetTurretPaths))

If you cannot/don't want to use my entire framework in your project, I can make a standalone implementation of Zen_GetTurretPaths for you.  However, I would recommend also looking at the nearly 200 other functions my framework offers to see if any others can help you.

Share this post


Link to post
Share on other sites
_vehType = "B_Heli_Light_01_F";
_baseCfg = configFile >> "CfgVehicles" >> _vehType;

_numCargo = count("
	if ( isText(_x >> 'proxyType') && { getText(_x >> 'proxyType') isEqualTo 'CPCargo' } ) then {
		true
	};
"configClasses ( _baseCfg >> "Turrets" )) + getNumber ( _baseCfg >> "transportSoldier" );

Checks each turret of the vehicle to see if they are CPCargo and adds transportSoldiers. Think that works out right for most vehicles. Tested against B_Heli_Light_01_F and B_Truck_01_transport_F.

Share this post


Link to post
Share on other sites
_vehType = "B_Heli_Light_01_F";
_baseCfg = configFile >> "CfgVehicles" >> _vehType;

_numCargo = count("
	if ( isText(_x >> 'proxyType') && { getText(_x >> 'proxyType') isEqualTo 'CPCargo' } ) then {
		true
	};
"configClasses ( _baseCfg >> "Turrets" )) + getNumber ( _baseCfg >> "transportSoldier" );

Checks each turret of the vehicle to see if they are CPCargo and adds transportSoldiers. Think that works out right for most vehicles. Tested against B_Heli_Light_01_F and B_Truck_01_transport_F.

 

Thanks Larrow, this sounds like it will work. I'll try it in my script tomorrow.

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

×