Jump to content

BuildGroundWP

From CMM Wiki
Return to CMM Command Reference
Environment: Mission Scripting
Function: BuildGroundWP
Function Description: Constructs a waypoint table based on input coordinates and road conditions, optionally forcing the point to lie on a road, and returns a waypoint with position, speed, action type, and road status.
File Location: cmm.spawnFunctions.lua
Syntax: CMM.BuildGroundWP( table WPTbl , boolean ForceRoad )
Return Value: table
Parameters: Name Description
WPTblTable containing x and y coordinates, optionally z for height, and speed in km/h; if z is present, y is ignored.
ForceRoadIf true, forces the point to be on a road by using the closest point on available roads; defaults to false.
Example: CMM.BuildGroundWP({x=100, y=200, z=50, speed=30})
Example Description: Creates a waypoint at (100, 200, 50) with a speed of 30 km/h, adjusts the point to the nearest road if forced, and returns a waypoint with action set to 'Column' if not on road.
Related Functions:
Notes: