Jump to content

ScheduleSpawnGroundUnit

From CMM Wiki
Revision as of 14:16, 10 February 2026 by Ozdeadmeat (talk | contribs) (ScheduleSpawnGroundUnit – created via PowerShell script (2026-02-11T01:16:44Z))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Return to CMM Command Reference
Environment: Mission Scripting
Function: ScheduleSpawnGroundUnit
Function Description: Builds Saved Tempates
File Location: cmm.templates.lua
Syntax: CMM.ScheduleSpawnGroundUnit( table argTable )
Return Value: table or nil
Parameters: Name Description
argTableA table consisting of arguments for the unit spawn, {TemplateTBL <string>, GroupName <string>, UnitType <string>, Country <number>, SpawnPoint , Heading <number>, Hidden <boolean>, Invisible <boolean>, Immortal <boolean>, Disperse <boolean>, CombatReady <boolean>
Example: CMM.ScheduleSpawnGroundUnit({TemplateTBL = "FOB_01#01245", GroupName = "FOB_01#01245_Unit1", UnitType = "M978 HEMTT Tanker", Country = 82, SpawnPoint = {x=0,y=0,z=0}, Heading = 33, Hidden = true, Invisible = false, Immortal = false, Disperse = false, CombatReady = false})
Example Description: Spawns a unit of type "M978 HEMTT Tanker" for country 82 at the specified spawn point with the specified heading and options, adds the spawned unit to the CMM.DEPLOYED table under the "FOB_01#01245" template, and returns the group object of the spawned unit if successful
Related Functions:
Notes:
}