SpawnCargo
Appearance
| Environment: | Mission Scripting | |
|---|---|---|
| Function: | SpawnCargo | |
| Function Description: | Spawns a static cargo object in the mission using a provided configuration table, assigning it to a specified country and categorizing it as a cargo unit. The function adds the object to the coalition's static objects and returns the object reference. | |
| File Location: | cmm.spawnFunctions.lua | |
| Syntax: | CMM.SpawnCargo( table argTable ) | |
| Return Value: | table | |
| Parameters: | Name | Description |
| argTable | {DeployedTBLName <string>, countryID <number>, StaticTBL <TBL>} – Configuration table containing the deployed table name, country ID to assign the object to, and a static object table that defines the object's properties, with an added category of "Cargos". | |
| Example: | CMM.SpawnCargo{DeployedT-_TBLName = "Cargo1", countryID = 1, StaticTBL = {name = "Cargo1", <vec3>} | |
| Example Description: | Deploys a cargo object named "Cargo1" in country 1 at coordinates (100, 200, 50) and returns the object reference. | |
| Related Functions: | ||
| Notes: | ||