Jump to content

TemplateBuilder: Difference between revisions

From CMM Wiki
TemplateBuilder – created via PowerShell script (2026-02-11T01:16:45Z)
 
m TemplateBuilder – created via PowerShell script (2026-06-24T22:27:24Z)
 
Line 1: Line 1:
{{Template:FunctionInfo|fName=          TemplateBuilder|fDescription=  Builds Saved Tempates|parentFile=    cmm.templates.lua|syntax=        CMM.TemplateBuilder(pos <TBL>, dir <number>, TemplateName <string>, BuildSide <number>, BuildTime <number>)|return=        string or nil|returnDesc=    Returns the name prefix for the template or nil if error|example=        CMM.TemplateBuilder({x,y,z}, 33,"FOB_01", 81, 300)|exampleDesc=    Build a template named FOB_01 in the direction of 33 facing the country side 81 and have it complete the build process in 300 seconds|related=        |note=          |envType= CMM|par1=        table pos|reqType1=    table|reqName1=    pos|desc1=      vec3 table|par2=        number dir|reqType2=    number|reqName2=    dir|desc2=      Direction the template will face when deployed|par3=        string TemplateName|reqType3=    string|reqName3=    TemplateName|desc3=      Name of the template to lookup|par4=        number BuildSide|reqType4=    number|reqName4=    BuildSide|desc4=      The country side to build the template for|par5=        number BuildTime|reqType5=    number|reqName5=    BuildTime|desc5=      How long you want the build to take to complete}}
{{Template:FunctionInfo|fName=          TemplateBuilder|fDescription=  Builds Saved Tempates|parentFile=    cmm.templates.lua|syntax=        CMM.TemplateBuilder(pos <TBL>, dir <number>, TemplateName <string>, BuildSide <number>, BuildTime <number>)|return=        string or nil|returnDesc=    Returns the name prefix for the template or nil if error|example=        CMM.TemplateBuilder({x,y,z}, 33,"FOB_01", 81, 300)|exampleDesc=    Build a template named FOB_01 in the direction of 33 facing the country side 81 and have it complete the build process in 300 seconds|related=        |note=          |envType= CMM|par1=        table pos|reqType1=    table|reqName1=    pos|desc1=      vec3 table|par2=        number dir|reqType2=    number|reqName2=    dir|desc2=      Direction the template will face when deployed|par3=        string DeploymentName|reqType3=    string|reqName3=    DeploymentName|desc3=      Name of the Deployment, (Do Check if unique against CMM.DEPLOYED)|par4=        string TemplateName|reqType4=    string|reqName4=    TemplateName|desc4=      Name of the template to lookup|par5=        number BuildCountry|reqType5=    number|reqName5=    BuildCountry|desc5=      The country side to build the template for|par6=        number BuildTime|reqType6=    number|reqName6=    BuildTime|desc6=      How long you want the build to take to complete|par7=        table or nil FARPSettings|optType7=    table or nil|optName7=    FARPSettings|desc7=      How long you want the build to take to complete}}

Latest revision as of 12:27, 24 June 2026

Return to CMM Command Reference
Environment: Mission Scripting
Function: TemplateBuilder
Function Description: Builds Saved Tempates
File Location: cmm.templates.lua
Syntax: CMM.TemplateBuilder( table pos , number dir , string DeploymentName , string TemplateName , number BuildCountry , number BuildTime ,table or nil FARPSettings )
Return Value: string or nil
Parameters: Name Description
posvec3 table
dirDirection the template will face when deployed
DeploymentNameName of the Deployment, (Do Check if unique against CMM.DEPLOYED)
TemplateNameName of the template to lookup
BuildCountryThe country side to build the template for
BuildTimeHow long you want the build to take to complete
FARPSettingsHow long you want the build to take to complete
Example: CMM.TemplateBuilder({x,y,z}, 33,"FOB_01", 81, 300)
Example Description: Build a template named FOB_01 in the direction of 33 facing the country side 81 and have it complete the build process in 300 seconds
Related Functions:
Notes: