Page MenuHomeFeedback Tracker

createUnit in cargo doesn't work for "O_G_Van_02_vehicle_F"
Closed, ResolvedPublic

Description

You can't spawn unit in cargo of "O_G_Van_02_vehicle_F" with createUnit and special parameter "CARGO"

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
Config
Steps To Reproduce

Execute this in the debug console:

private _group = createGroup [west, true]; 
private _veh = createVehicle ["O_G_Van_02_vehicle_F", getPos player, [], 0, "FLY"]; 

private _unit = _group createUnit [typeof player, getPos player, [], 0, "CARGO"]; 
_unit moveinDriver _veh;
_group createUnit [typeof player, getPos player, [], 0, "CARGO"];
_group createUnit [typeof player, getPos player, [], 0, "CARGO"];
Additional Information

Event Timeline

Vdauphin created this task.May 5 2020, 4:36 PM
Wulf closed this task as Resolved.May 6 2020, 1:12 PM
Wulf claimed this task.
Wulf added a subscriber: Wulf.
This comment was removed by Wulf.
Wulf added a comment.EditedMay 6 2020, 1:33 PM

Yes, and no. You see with the default Van (Cargo) it won't work. As by default Van (Cargo) has no seats for AI. Meaning you would have to add seats via Garage. However settings in the garage can be exported from Virtual Arsenal > Garage and then used in script.(See bellow)

You need to add.

[
	_veh,
	["Blue",1], 
	["Enable_Cargo",1,"Door_1_source",0,"Door_2_source",0,"Door_3_source",0,"Door_4_source",0,"Hide_Door_1_source",0,"Hide_Door_2_source",0,"Hide_Door_3_source",0,"Hide_Door_4_source",0,"lights_em_hide",0,"ladder_hide",1,"spare_tyre_holder_hide",1,"spare_tyre_hide",1,"reflective_tape_hide",1,"roof_rack_hide",1,"LED_lights_hide",1,"sidesteps_hide",1,"rearsteps_hide",0,"side_protective_frame_hide",1,"front_protective_frame_hide",1,"beacon_front_hide",1,"beacon_rear_hide",1]
] call BIS_fnc_initVehicle;

So for your script to work it would need to look like this:

private _group = createGroup [west, true]; 
private _veh = createVehicle ["C_Van_02_vehicle_F", getPos player, [], 0, "FLY"]; 
[
	_veh,
	["Blue",1], 
	["Enable_Cargo",1,"Door_1_source",0,"Door_2_source",0,"Door_3_source",0,"Door_4_source",0,"Hide_Door_1_source",0,"Hide_Door_2_source",0,"Hide_Door_3_source",0,"Hide_Door_4_source",0,"lights_em_hide",0,"ladder_hide",1,"spare_tyre_holder_hide",1,"spare_tyre_hide",1,"reflective_tape_hide",1,"roof_rack_hide",1,"LED_lights_hide",1,"sidesteps_hide",1,"rearsteps_hide",0,"side_protective_frame_hide",1,"front_protective_frame_hide",1,"beacon_front_hide",1,"beacon_rear_hide",1]
] call BIS_fnc_initVehicle;

private _unit = _group createUnit [typeof player, getPos player, [], 0, "CARGO"]; 
_unit moveinDriver _veh;

_group createUnit [typeof player, getPos player, [], 0, "CARGO"];
_group createUnit [typeof player, getPos player, [], 0, "CARGO"];

As by default Van (Cargo) has no seats for AI.

Which command return seats for AI?

private _group = createGroup [west, true]; 
private _veh = createVehicle ["O_G_Van_02_vehicle_F", getPos player, [], 0, "FLY"]; 
count fullCrew [_veh, "cargo", true]

Return 6 in this case which mean there are 6 seats as cargo available

However settings in the garage can be exported from Virtual Arsenal > Garage and then used in script.(See bellow)

My script need to handle multiple types of vehicles. I need a command returning the number of seats/cargo available for AI.
If this command exist then you can fix this https://feedback.bistudio.com/T129141