StaticSpawn
Appearance
| Environment: | Mission Scripting | |
|---|---|---|
| Function: | StaticSpawn | |
| Function Description: | Spawns a static object in the mission environment using provided group data, assigning a unique group and unit ID, setting default properties, and adding the object to the coalition based on country and position. | |
| File Location: | cmm.spawnFunctions.lua | |
| Syntax: | CMM.StaticSpawn( table grp ) | |
| Return Value: | boolean | |
| Parameters: | Name | Description |
| grp | {country <string>, countryId <number>, x <number>, y <number>, type <string>, name <string>, unitName <string>, category <string>, categoryStatic <string>, shapeName <string>, units <TBL>, dead <boolean>, heading <number>, unitId <number>, groupId <number>, clone <boolean>} – group object containing static object data, including position, type, country, and optional unit details. | |
| Example: | CMM.StaticSpawn({country = "RED", x = 1000, y = 2000, type = "TANK", name = "StaticTank", category = "ARMOR"}) | |
| Example Description: | Spawns a RED tank named "StaticTank" at coordinates (1000, 2000) with default category ARMOR and adds it to the mission. | |
| Related Functions: | ||
| Notes: | ||