dcsex.ai.Waypoint

Define a waypoint in a DCS route.

Contents

  1. Description
  2. Methods
    1. waypoint:createGround(point, speed, formation, name)
    2. waypoint:createNaval(point, speed, depth, name)
    3. waypoint:createLandingTakeoff(airbase, wtype, speed)
    4. waypoint:setPoint(vec2, wptype, action)
    5. waypoint:setAlt(alt, alttype)
    6. waypoint:setSpeed(spd)
    7. waypoint:setETA(time)
    8. waypoint:addTask(task, tasktype, idx)
    9. waypoint:removeTask(idx)
    10. waypoint:get()
  3. Metamethods
    1. waypoint:__init(point, wtype, action, speed, name)
  4. Tables
    1. waypoint.wpType
    2. waypoint.wpAction

Description

Helps in constructing a DCS mission task, see “DCS task mission” on Hoggit Wiki.

Methods

waypoint:createGround(point, speed, formation, name)

Parameters

point
a Vec2
speed
number in meters per second
formation
(optional) one of AI.Task.VehicleFormation
name
(optional) name of waypoint

waypoint:createNaval(point, speed, depth, name)

Parameters

point
a Vec2
speed
number in meters per second
depth
(optional) depth in meters
name
(optional) name of waypoint

waypoint:createLandingTakeoff(airbase, wtype, speed)

Parameters

airbase
a DCS Airbase instance
wtype
one of Waypoint.wpType, required to specify the takeoff type or landing
speed
(optional) speed in meters per second

waypoint:setPoint(vec2, wptype, action)

Parameters

vec2
a Vec2 point
wptype
one of Waypoint.wpType
action
(optional) one of Waypoint.wpAction otherwise an appropriate value will be chosen based on wtype

waypoint:setAlt(alt, alttype)

Parameters

alt
altitude to set for the waypoint
alttype
AI.Task.AltitudeType.* the default is BARO

waypoint:setSpeed(spd)

Parameters

spd
speed in meters per second

waypoint:setETA(time)

Parameters

time
time in seconds since the mission started

waypoint:addTask(task, tasktype, idx)

Parameters

task
task table
tasktype
dcsex.enum.TASKTYPE
idx
(optional) if provided is the integer index to insert the new task at, otherwise appends to the end of the list

waypoint:removeTask(idx)

Parameters

idx
(optional) remove Waypoint at idx position, otherwise remove the Waypoint at the end of the list

waypoint:get()

Returns

  • table

Metamethods

waypoint:__init(point, wtype, action, speed, name)

Parameters

point
Vec2|Vec3 if Vec3 the altitude component will be used to set the altitude of the waypoint
wtype
one of Waypoint.wpType
action
(optional) one of Waypoint.wpAction otherwise an appropriate value will be chosen based on wtype
speed
(optional) speed in meters per second
name
(optional) name of the waypoint

Tables

waypoint.wpType

Use TURNING_POINT for ships and ground groups.

Parameters

[TURNING_POINT]
[TAKEOFF]
[TAKEOFF_PARKING]
[TAKEOFF_PARKING_HOT]
[TAKEOFF_GROUND]
[TAKEOFF_GROUND_HOT]
[LAND]
[LAND_REARM]

waypoint.wpAction

Use TURNING_POINT for ships and ground groups.

Parameters

[TURNING_POINT]
[FLY_OVER_POINT]
[FROM_PARKING]
[FROM_PARKING_HOT]
[FROM_GROUND]
[FROM_GROUND_HOT]
[FROM_RUNWAY]
[LANDING]
[LANDING_REARM]