Jump to content
Sign in to follow this  
1para{god-father}

How to fill Truck with troops

Recommended Posts

When i spawn a Vehicle i thought it would be full off troops but that would be too easy :)

How can i fill my truck with troops ?

_grptank = creategroup EAST;
_tankSpawn = [[(_pos) select 0, (_pos select 1), 0], 0, "KamazOpen", _grptank] call BIS_fnc_spawnVehicle;
_tankSpawn setVehicleVarname "Troopcarry1";

Do I have to create a group of men then move them into cargo ?

Share this post


Link to post
Share on other sites

Exactly that way, create a group and move each of them into cargo. :)

_pos = getMarkerPos (_this select 0);

_grptank = creategroup EAST;
_tankSpawn = [[(_pos) select 0, (_pos select 1), 0], 0, "KamazOpen", _grptank] call BIS_fnc_spawnVehicle;
_tank = _tankSpawn select 0;
_tank setVehicleVarname "Troopcarry1";

_grpinf = [[1,1,1], EAST, (configFile >> "CfgGroups" >> "East" >> "RU" >> "Infantry" >> "RU_InfSquad")] call BIS_fnc_spawnGroup;

{_x assignAsCargo _tank; _x moveInCargo _tank;} forEach units _grpinf;

Edited by kylania

Share this post


Link to post
Share on other sites

To find how many cargo seats are available you can use emptyPositions.

_freePositions = (vehicle player) emptyPositions "cargo";

Share this post


Link to post
Share on other sites

Or you can move all the soldiers into vehicle and delete the soldiers not in vehicle.

Share this post


Link to post
Share on other sites

If you want to move in troops to a vehicle right at the start, you use the Moveincargo command. The vehicle you are using needs to have a name. You can find this text box when you double click the vehicle in the editor. You give the vehicle a name (ex. Truck). Then, you get all your troops and type this In the unit line: this moveInCargo Truck; And you need to do this for every troop and not just the leader of a squad. You can copy and past it so you don't have to keep typing it in :P

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  

×