Jump to content

DeployTemplate: Difference between revisions

From CMM Wiki
DeployTemplate – created via PowerShell script (2025-11-11T21:12:12Z)
Tag: Recreated
 
m DeployTemplate – created via PowerShell script (2026-02-11T01:16:06Z)
 
Line 1: Line 1:
{{Template:FunctionInfo|fName=          DeployTemplate|fDescription=  Deploys a GARRISON template within the time specified|parentFile=    cmm.DCSFunctions.lua|syntax=        CMM.DeployTemplate(position <table> ,direction <number> ,deploymentName <string>,templateType <string>,country <number>, buildtime <number>, notification <boolean>, warehouseInventory <table>)|return=        table or nil|returnDesc=    Returns a table of markerID's|example=        CMM.DeployTemplate(fob_pos,fob_dir,"FOB_01","FOB_01",CMM.bluforID,20,false)|exampleDesc=    Deploys a FOB_01 style template for the blue coalition within 20 seconds|related=        |note=          |envType= CMM|par1=        table position|reqType1=    table|reqName1=    position|desc1=      vec3 style Table {x, y, z}|par2=        number direction|reqType2=    number|reqName2=    direction|desc2=      A table representing a 3D vector {x, y, z} used to extract latitude and longitude via coord.LOtoLL.|par3=        string deploymentName|reqType3=    string|reqName3=    deploymentName|desc3=      Name to be given to the Deployment --TODO might be removed at some point, seems redundant|par4=        string templateType|reqType4=    string|reqName4=    templateType|desc4=      GARRISON Template Name|par5=        number country|reqType5=    number|reqName5=    country|desc5=      Country ID to spawn the units in the template|par6=        number buildtime|reqType6=    number|reqName6=    buildtime|desc6=      How long the Deployment should take to complete|par7=        boolean or nil notification|optType7=    boolean or nil|optName7=    notification|desc7=      Boolean to notify players or not [DEFAULT: false]|par8=        table or nil warehouseInventory|optType8=    table or nil|optName8=    warehouseInventory|desc8=      A getInventory() table that the Template should use if it has an available FARP object}}
{{Template:FunctionInfo|fName=          DeployTemplate|fDescription=  Deploys a GARRISON template within the time specified|parentFile=    cmm.DCSFunctions.lua|syntax=        CMM.DeployTemplate(position <table> ,direction <number> ,deploymentName <string>,templateType <string>,country <number>, buildtime <number>, notification <boolean>, warehouseInventory <table>)|return=        table or nil|returnDesc=    Returns a table of markerID's|example=        CMM.DeployTemplate(fob_pos,fob_dir,"FOB_01","FOB_01",CMM.bluforID,20,false)|exampleDesc=    Deploys a FOB_01 style template for the blue coalition within 20 seconds|related=        |note=          |envType= CMM|par1=        table position|reqType1=    table|reqName1=    position|desc1=      vec3 style Table {x, y, z}|par2=        number direction|reqType2=    number|reqName2=    direction|desc2=      A table representing a 3D vector {x, y, z} used to extract latitude and longitude via coord.LOtoLL.|par3=        string deploymentName|reqType3=    string|reqName3=    deploymentName|desc3=      Name to be given to the Deployment --TODO might be removed at some point, seems redundant|par4=        string templateType|reqType4=    string|reqName4=    templateType|desc4=      CMM Template Name|par5=        number country|reqType5=    number|reqName5=    country|desc5=      Country ID to spawn the units in the template|par6=        number buildtime|reqType6=    number|reqName6=    buildtime|desc6=      How long the Deployment should take to complete|par7=        boolean or nil notification|optType7=    boolean or nil|optName7=    notification|desc7=      Boolean to notify players or not [DEFAULT: false]|par8=        table or nil warehouseInventory|optType8=    table or nil|optName8=    warehouseInventory|desc8=      A getInventory() table that the Template should use if it has an available FARP object}}

Latest revision as of 14:16, 10 February 2026

Return to CMM Command Reference
Environment: Mission Scripting
Function: DeployTemplate
Function Description: Deploys a GARRISON template within the time specified
File Location: cmm.DCSFunctions.lua
Syntax: CMM.DeployTemplate( table position , number direction , string deploymentName , string templateType , number country , number buildtime ,boolean or nil notification , table or nil warehouseInventory )
Return Value: table or nil
Parameters: Name Description
positionvec3 style Table {x, y, z}
directionA table representing a 3D vector {x, y, z} used to extract latitude and longitude via coord.LOtoLL.
deploymentNameName to be given to the Deployment --TODO might be removed at some point, seems redundant
templateTypeCMM Template Name
countryCountry ID to spawn the units in the template
buildtimeHow long the Deployment should take to complete
notificationBoolean to notify players or not [DEFAULT: false]
warehouseInventoryA getInventory() table that the Template should use if it has an available FARP object
Example: CMM.DeployTemplate(fob_pos,fob_dir,"FOB_01","FOB_01",CMM.bluforID,20,false)
Example Description: Deploys a FOB_01 style template for the blue coalition within 20 seconds
Related Functions:
Notes: