beako 13 Posted July 18, 2019 HI All, Based on createUnit using syntax type createUnit [position, group, init, skill, rank] it states ""CARGO" - The unit will be created in cargo of the group's vehicle, regardless of the passed position. If group has no vehicle or there is no cargo space available, the unit will be placed according to "NONE"." Yet, I cannot create units inside a vehicle unless I use moveIn as below. _posLand = screenToWorld [0.5,0.5]; _veh = "O_T_LSV_02_armed_F" createVehicle [0,0,100]; _grp = createGroup EAST; _veh setVehiclePosition [_posLand, [], 0]; _grp addVehicle _veh; _unit = _grp createUnit ["O_V_Soldier_ghex_F", [0,0,0], [], 0, "CARGO"]; _unit moveInAny _veh; Is there a way to create units directly inside a vehicle with designating a position or moving them in? Share this post Link to post Share on other sites
gc8 970 Posted July 18, 2019 I guess it doesn't work because the vehicle doesn't have any crew? (So it doesn't belong to any group, at least not at start) Share this post Link to post Share on other sites
beako 13 Posted July 18, 2019 I thought so also at first so I used BIS_fnc_spawnVehicle, then tried to add a unit in the spawned vehicle with: _vehArray = [[0,0,100], getDir player, _x, _AIside] call BIS_fnc_spawnVehicle; _veh = _vehArray select 0; _vehCrew = _vehArray select 1; _grp = _vehArray select 2; _veh setVehiclePosition [_posLand, [], 0]; _grp addVehicle _veh; _unit = _grp createUnit ["O_V_Soldier_ghex_F", [0,0,0], [], 0, "CARGO"]; _unit moveInAny _veh; But this too does not create the unit in the "CARGO" of the vehicle. Share this post Link to post Share on other sites
wogz187 1085 Posted July 18, 2019 @beako, Do you need this? I remember having trouble if my unit wasn't assigned as cargo. Share this post Link to post Share on other sites
killzone_kid 1326 Posted July 18, 2019 Maybe it doesn't work with any vehicle, or maybe with any vehicle that has FFV, worth checking. I added example 5 on BIKI that works https://community.bistudio.com/wiki/createUnit 1 1 Share this post Link to post Share on other sites