Vehicle in Vehicle Transport – Arma 3
m (changed category) |
Lou Montana (talk | contribs) m (Page refresh) |
||
Line 1: | Line 1: | ||
{{SideTOC}} | |||
[[ | [[Arma 3 Vehicle in Vehicle Transport|Vehicle in Vehicle Transport]] functionality was added in Arma 3 Apex expansion. | ||
For proper function it needs suitable transport vehicle with cargo space defined in model and in config. | |||
Vehicle in Vehicle Transport functionality was added in Arma 3 Apex expansion. For proper function it needs suitable transport vehicle with cargo space defined in model and in config. | |||
Transported vehicles on the other hand needs no special treatment - important is only their size (estimated from bounding box) and weight. | Transported vehicles on the other hand needs no special treatment - important is only their size (estimated from bounding box) and weight. | ||
There are multiple config parameters for both transport and transported vehicles which can be used for further tweaking of functionality. | There are multiple config parameters for both transport and transported vehicles which can be used for further tweaking of functionality. | ||
== Scripting commands== | |||
== Scripting commands == | |||
==== [[enableVehicleCargo]] ==== | ==== [[enableVehicleCargo]] ==== | ||
Enable/disable option to transport other vehicles (if configured) or be transported. | Enable/disable option to transport other vehicles (if configured) or be transported. | ||
==== [[vehicleCargoEnabled]] ==== | ==== [[vehicleCargoEnabled]] ==== | ||
Check if the vehicle has enabled transporting other vehicles or not. | Check if the vehicle has enabled transporting other vehicles or not. | ||
Line 15: | Line 16: | ||
==== [[isVehicleCargo]] ==== | ==== [[isVehicleCargo]] ==== | ||
Return transporting vehicle if vehicle is loaded in one. | Return transporting vehicle if vehicle is loaded in one. | ||
==== [[canVehicleCargo]] ==== | ==== [[canVehicleCargo]] ==== | ||
Returns bool array if it is possible to load cargo inside vehicle and if possible to load cargo into empty vehicle | Returns bool array if it is possible to load cargo inside vehicle and if possible to load cargo into empty vehicle | ||
==== [[getVehicleCargo]] ==== | ==== [[getVehicleCargo]] ==== | ||
Gets a list of vehicles loaded as cargo inside this vehicle. The returned array is in the order the cargo vehicles were added to containing vehicle. | Gets a list of vehicles loaded as cargo inside this vehicle. The returned array is in the order the cargo vehicles were added to containing vehicle. | ||
==== [[setVehicleCargo]] ==== | ==== [[setVehicleCargo]] ==== | ||
Load cargo vehicle inside vehicle if possible, returns bool based on whether the vehicle was able to be loaded | Load cargo vehicle inside vehicle if possible, returns bool based on whether the vehicle was able to be loaded | ||
==Transport/transported vehicles and parameters == | == Transport/transported vehicles and parameters == | ||
'''Transported vehicles''' | '''Transported vehicles''' | ||
Line 36: | Line 40: | ||
class VehicleTransport | class VehicleTransport | ||
{ | { | ||
class Cargo | |||
{ | |||
parachuteClass = B_Parachute_02_F; // Type of parachute used when dropped in air. When empty then parachute is not used. | |||
parachuteHeightLimit = 40; // Minimal height above terrain when parachute is used. | |||
canBeTransported = 1; // 0 (false) / 1 (true) | |||
dimensions[] = { "BBox_1_1_pos", "BBox_1_2_pos" }; // Memory-point-based override of automatic bounding box | |||
}; | |||
}; | }; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 58: | Line 62: | ||
class VehicleTransport | class VehicleTransport | ||
{ | { | ||
class Carrier | |||
{ | |||
cargoBayDimensions[] = {"VTV_limit_1", "VTV_limit_2"}; // Memory points in model defining cargo space | |||
disableHeightLimit = 1; // If set to 1 disable height limit of transported vehicles | |||
maxLoadMass = 200000; // Maximum cargo weight (in Kg) which the vehicle can transport | |||
cargoAlignment[] = {"front", "left"}; // Array of 2 elements defining alignment of vehicles in cargo space. Possible values are left, right, center, front, back. Order is important. | |||
cargoSpacing[] = {0, 0.15, 0}; // Offset from X,Y,Z axes (in metres) | |||
exits[] = {"VTV_exit_1", "VTV_exit_2"}; // Memory points in model defining loading ramps, could have multiple | |||
unloadingInterval = 2; // Time between unloading vehicles (in seconds) | |||
loadingDistance = 10; // Maximal distance for loading in exit point (in meters). | |||
loadingAngle = 60; // Maximal sector where cargo vehicle must be to for loading (in degrees). | |||
parachuteClassDefault = B_Parachute_02_F; // Type of parachute used when dropped in air. Can be overridden by parachuteClass in Cargo. | |||
parachuteHeightLimitDefault = 50; // Minimal height above terrain when parachute is used. Can be overriden by parachuteHeightLimit in Cargo. | |||
}; | |||
}; | }; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 79: | Line 83: | ||
''Example of defined cargo space with two exits'' | ''Example of defined cargo space with two exits'' | ||
== Sorting vehicles in cargo space == | |||
== Sorting vehicles in cargo space == | |||
* vehicles in cargo space can be centred and aligned | * vehicles in cargo space can be centred and aligned | ||
* handled via combined parameter "CargoAlignment" - it's an array of 2 elements | * handled via combined parameter "CargoAlignment" - it's an array of 2 elements | ||
Line 93: | Line 99: | ||
File:quad.jpg|Example 1: Two vehicles, horizontally centered in cargo space|alt=alt language | File:quad.jpg|Example 1: Two vehicles, horizontally centered in cargo space|alt=alt language | ||
File:ship.jpg|Example 2: Multiple vehicles loaded, automatically sorted and aligned to top left corner of cargo space|alt=alt language | File:ship.jpg|Example 2: Multiple vehicles loaded, automatically sorted and aligned to top left corner of cargo space|alt=alt language | ||
</gallery> | </gallery> | ||
[[Category:Arma 3: Tutorials]] | |||
[[Category:Arma 3: Vehicle Configuration]] |
Revision as of 20:39, 19 March 2020
Template:SideTOC Vehicle in Vehicle Transport functionality was added in Arma 3 Apex expansion. For proper function it needs suitable transport vehicle with cargo space defined in model and in config. Transported vehicles on the other hand needs no special treatment - important is only their size (estimated from bounding box) and weight. There are multiple config parameters for both transport and transported vehicles which can be used for further tweaking of functionality.
Scripting commands
enableVehicleCargo
Enable/disable option to transport other vehicles (if configured) or be transported.
vehicleCargoEnabled
Check if the vehicle has enabled transporting other vehicles or not.
isVehicleCargo
Return transporting vehicle if vehicle is loaded in one.
canVehicleCargo
Returns bool array if it is possible to load cargo inside vehicle and if possible to load cargo into empty vehicle
getVehicleCargo
Gets a list of vehicles loaded as cargo inside this vehicle. The returned array is in the order the cargo vehicles were added to containing vehicle.
setVehicleCargo
Load cargo vehicle inside vehicle if possible, returns bool based on whether the vehicle was able to be loaded
Transport/transported vehicles and parameters
Transported vehicles
- only dimensions and weight of vehicle/object are important parameters
- if size is not defined in config, bounding box is used
- mass of loaded vehicle(s) is added to transport vehicle
- specific vehicles can be blacklisted and therefore can't be loaded, done with config parameter
- there are also optional parameters for parachute
- all these parameters are overriding transport vehicle config - if they are not present, default values are used (vehicle can be transported and parachute defined in transport vehicle is used)
Example of transported vehicle config:
class VehicleTransport
{
class Cargo
{
parachuteClass = B_Parachute_02_F; // Type of parachute used when dropped in air. When empty then parachute is not used.
parachuteHeightLimit = 40; // Minimal height above terrain when parachute is used.
canBeTransported = 1; // 0 (false) / 1 (true)
dimensions[] = { "BBox_1_1_pos", "BBox_1_2_pos" }; // Memory-point-based override of automatic bounding box
};
};
Transport vehicles
- functionallity is not restricted to vehicle type
- name of memory points placed on model must be same as the ones used in config
- cargo space can have multiple exit points
- loading area can be defined
- parachute models must be defined for dropping cargo in air
Example of transport vehicle config:
class VehicleTransport
{
class Carrier
{
cargoBayDimensions[] = {"VTV_limit_1", "VTV_limit_2"}; // Memory points in model defining cargo space
disableHeightLimit = 1; // If set to 1 disable height limit of transported vehicles
maxLoadMass = 200000; // Maximum cargo weight (in Kg) which the vehicle can transport
cargoAlignment[] = {"front", "left"}; // Array of 2 elements defining alignment of vehicles in cargo space. Possible values are left, right, center, front, back. Order is important.
cargoSpacing[] = {0, 0.15, 0}; // Offset from X,Y,Z axes (in metres)
exits[] = {"VTV_exit_1", "VTV_exit_2"}; // Memory points in model defining loading ramps, could have multiple
unloadingInterval = 2; // Time between unloading vehicles (in seconds)
loadingDistance = 10; // Maximal distance for loading in exit point (in meters).
loadingAngle = 60; // Maximal sector where cargo vehicle must be to for loading (in degrees).
parachuteClassDefault = B_Parachute_02_F; // Type of parachute used when dropped in air. Can be overridden by parachuteClass in Cargo.
parachuteHeightLimitDefault = 50; // Minimal height above terrain when parachute is used. Can be overriden by parachuteHeightLimit in Cargo.
};
};
Example of defined cargo space with two exits
Sorting vehicles in cargo space
- vehicles in cargo space can be centred and aligned
- handled via combined parameter "CargoAlignment" - it's an array of 2 elements
- Values can be front, back, center, left, right. Order of them is important.
Examples:
- if first one is "front" then front part of transport will be filled first. If then second word is left, it will be filled from left side, but still front first.
- VTOL example would be "center" and "front" so vehicles would be inserted in center line from front to back.
- Ferry example would be "left" and "front" so vehicles should loaded form top left corner to back
- quad.jpg
Example 1: Two vehicles, horizontally centered in cargo space
- ship.jpg
Example 2: Multiple vehicles loaded, automatically sorted and aligned to top left corner of cargo space