Jump to content

StaticSpawn

From CMM Wiki
Revision as of 10:12, 11 November 2025 by Ozdeadmeat (talk | contribs) (StaticSpawn – created via PowerShell script (2025-11-11T21:12:40Z))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Return to CMM Command Reference
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: