Jump to content

Tools.BuildWPpointTable

From CMM Wiki
Revision as of 10:12, 11 November 2025 by Ozdeadmeat (talk | contribs) (tools.BuildWPpointTable – created via PowerShell script (2025-11-11T21:12:52Z))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Return to CMM Command Reference
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
GroupNameName of the group containing waypoints to extract. Must be a valid group name defined in the mission editor.
ModeMode 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.
SkipFirstIf 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: