Tools.BuildWPpointTable
Appearance
| Environment: | Mission Scripting | |
|---|---|---|
| Function: | tools.BuildWPpointTable | |
| Function Description: | Constructs a table of waypoints based on a group's waypoints and a specified mode. It calculates positions relative to a unit or origin point, supporting different modes for position derivation. Returns a table of vectors or nil if group or mode is invalid. | |
| File Location: | cmm.tools.lua | |
| Syntax: | CMM.tools.BuildWPpointTable( string GroupName , number Mode , boolean SkipFirst ) | |
| Return Value: | table or nil | |
| Parameters: | Name | Description |
| GroupName | Name of the group containing waypoints to extract. Must be a valid group name defined in the mission editor. | |
| Mode | Mode for position calculation (0 = raw positions, 1 = relative to first unit, 2 = relative to unit position using CMM.GetRelativePosition). Defaults to 1 if not provided. | |
| SkipFirst | If true, skips the first waypoint in the group. Defaults to false. | |
| Example: | CMM.tools.BuildWPpointTable("WhyUbreakMyShitED",2,true) | |
| Example Description: | Extracts relative positions from the group "WhyUbreakMyShitED", skipping the first waypoint, using mode 2 for relative positioning. | |
| Related Functions: | ||
| Notes: | ||