Jump to content

NewMission

From CMM Wiki
Revision as of 10:12, 11 November 2025 by Ozdeadmeat (talk | contribs) (NewMission – created via PowerShell script (2025-11-11T21:12:41Z))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Return to CMM Command Reference
Environment: Mission Scripting
Function: NewMission
Function Description: Creates a new mission by assigning a route to a group using waypoints, supports both string and table input for the group, and returns true if the task is successfully set on the group's controller, otherwise false.
File Location: cmm.spawnFunctions.lua
Syntax: CMM.NewMission( string or table Grp , table path )
Return Value: boolean
Parameters: Name Description
GrpEither a string name of a group or a group table, if string it is resolved to a group via Group.getByName.
pathTable of waypoints, each waypoint is a table with point data, the first entry is prepended to the path as the initial position of the group's first unit.
Example: CMM.NewMission("USA_Troops", {"WP1", "WP2", "WP3"})
Example Description: Assigns a route to the USA_Troops group using three waypoints, with the initial point derived from the first unit's position, and logs a message indicating the task was sent to the controller.
Related Functions:
Notes: