Jump to content

SpawnGroundGroup: Difference between revisions

From CMM Wiki
SpawnGroundGroup – created via PowerShell script (2025-11-11T21:12:39Z)
Tag: Recreated
 
m SpawnGroundGroup – created via PowerShell script (2026-01-01T06:03:31Z)
 
Line 1: Line 1:
{{Template:FunctionInfo|fName=          SpawnGroundGroup|fDescription=  Spawns a ground unit group with specified configuration including group name, unit types, country, rules of engagement, dispersion settings, and alarm state. The function supports optional parameters such as spawn range, heading range, AI behavior, and visibility settings.|parentFile=    cmm.spawnFunctions.lua|syntax=        CMM.SpawnGroundGroup(<argTable table>)|return=        |returnDesc=    |example=        CMM.SpawnGroundGroup({"NewGroupOfDOOM", "Unit.Category.GROUND_UNIT", 81, AI.Option.Ground.val.ROE.RETURN_FIRE, 120})|exampleDesc=    Spawns a group named "NewGroupOfDOOM" with ground units, assigned to country 81, using a ROE of RETURN_FIRE, disperse on attack after 120 seconds, and sets alarm state to 110–135 range.|related=        |note=          |envType= CMM|par1=        table argTable|reqType1=    table|reqName1=    argTable|desc1=      {GroupName <string>, category <string>, country <number>, ROE <number>, DOA <number>, alarmState <TBL>} – Group configuration table where GroupName defines the group name, category specifies the unit type, country sets the owning nation, ROE defines rules of engagement, DOA sets dispersion on attack time in seconds, and alarmState defines the alarm state range.}}
{{Template:FunctionInfo|fName=          SpawnGroundGroup|fDescription=  Spawns a ground unit group with specified configuration including group name, unit types, country, rules of engagement, dispersion settings, and alarm state. The function supports optional parameters such as spawn range, heading range, AI behavior, and visibility settings.|parentFile=    cmm.spawnFunctions.lua|syntax=        CMM.SpawnGroundGroup(<argTable table>)|return=        table,table or nil|returnDesc=    Returns the AI controller and group object of the spawned ground unit group, or nil if the spawn fails.|example=        CMM.SpawnGroundGroup({"NewGroupOfDOOM", "Unit.Category.GROUND_UNIT", 81, AI.Option.Ground.val.ROE.RETURN_FIRE, 120})|exampleDesc=    Spawns a group named "NewGroupOfDOOM" with ground units, assigned to country 81, using a ROE of RETURN_FIRE, disperse on attack after 120 seconds, and sets alarm state to 110–135 range.|related=        |note=          |envType= CMM|par1=        table argTable|reqType1=    table|reqName1=    argTable|desc1=      {GroupName <string>, category <string>, country <number>, ROE <number>, DOA <number>, alarmState <TBL>} – Group configuration table where GroupName defines the group name, category specifies the unit type, country sets the owning nation, ROE defines rules of engagement, DOA sets dispersion on attack time in seconds, and alarmState defines the alarm state range.}}

Latest revision as of 19:03, 31 December 2025

Return to CMM Command Reference
Environment: Mission Scripting
Function: SpawnGroundGroup
Function Description: Spawns a ground unit group with specified configuration including group name, unit types, country, rules of engagement, dispersion settings, and alarm state. The function supports optional parameters such as spawn range, heading range, AI behavior, and visibility settings.
File Location: cmm.spawnFunctions.lua
Syntax: CMM.SpawnGroundGroup( table argTable )
Return Value: table,table or nil
Parameters: Name Description
argTable{GroupName <string>, category <string>, country <number>, ROE <number>, DOA <number>, alarmState <TBL>} – Group configuration table where GroupName defines the group name, category specifies the unit type, country sets the owning nation, ROE defines rules of engagement, DOA sets dispersion on attack time in seconds, and alarmState defines the alarm state range.
Example: CMM.SpawnGroundGroup({"NewGroupOfDOOM", "Unit.Category.GROUND_UNIT", 81, AI.Option.Ground.val.ROE.RETURN_FIRE, 120})
Example Description: Spawns a group named "NewGroupOfDOOM" with ground units, assigned to country 81, using a ROE of RETURN_FIRE, disperse on attack after 120 seconds, and sets alarm state to 110–135 range.
Related Functions:
Notes: