NewMission
Appearance
| 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 |
| Grp | Either a string name of a group or a group table, if string it is resolved to a group via Group.getByName. | |
| path | Table 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: | ||