Tools.BuildWPpointTable: Difference between revisions
Appearance
Ozdeadmeat (talk | contribs) tools.BuildWPpointTable – created via PowerShell script (2025-11-11T21:12:52Z) Tag: Recreated |
Ozdeadmeat (talk | contribs) m tools.BuildWPpointTable – created via PowerShell script (2026-06-24T22:27:29Z) |
||
| Line 1: | Line 1: | ||
{{Template:FunctionInfo|fName= tools.BuildWPpointTable|fDescription= 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.|parentFile= cmm.tools.lua|syntax= CMM.tools.BuildWPpointTable(GroupName <string>, Mode <number>, SkipFirst <boolean>)|return= table or nil|returnDesc= Returns a table of vectors representing the waypoints, or nil if group not found or no waypoints exist.|example= CMM.tools.BuildWPpointTable("WhyUbreakMyShitED",2,true)|exampleDesc= Extracts relative positions from the group "WhyUbreakMyShitED", skipping the first waypoint, using mode 2 for relative positioning.|related= |note= |envType= CMM|par1= string GroupName|reqType1= string|reqName1= GroupName|desc1= Name of the group containing waypoints to extract. Must be a valid group name defined in the mission editor.|par2= number Mode| | {{Template:FunctionInfo|fName= tools.BuildWPpointTable|fDescription= 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.|parentFile= cmm.tools.lua|syntax= CMM.tools.BuildWPpointTable(GroupName <string>, Mode <number>, SkipFirst <boolean>)|return= table or nil|returnDesc= Returns a table of vectors representing the waypoints, or nil if group not found or no waypoints exist.|example= CMM.tools.BuildWPpointTable("WhyUbreakMyShitED",2,true)|exampleDesc= Extracts relative positions from the group "WhyUbreakMyShitED", skipping the first waypoint, using mode 2 for relative positioning.|related= |note= |envType= CMM|par1= string GroupName|reqType1= string|reqName1= GroupName|desc1= Name of the group containing waypoints to extract. Must be a valid group name defined in the mission editor.|par2= number or nil Mode|optType2= number or nil|optName2= Mode|desc2= 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.|par3= boolean or nil SkipFirst|optType3= boolean or nil|optName3= SkipFirst|desc3= If true, skips the first waypoint in the group. Defaults to false.}} | ||
Latest revision as of 12:27, 24 June 2026
| 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 or nil Mode , boolean or nil 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: | ||