VR-Forces 4.10 Lua Function Documentation

These pages document the Lua functions that you can use in scripted tasks. For high level concepts about how to use Lua to write scripted tasks, please see VR-Forces User's Guide.

The modules listed in the table of contents include classes, packages of functions in a name space, and collections of global functions:

  • Global functions (usage: vrf:<function name>(...))
    • vrf
  • Classes (usage: <class object>:<function name>(...))
    • Features
      • FeatureGeometry
      • FeatureSet
    • Geometry
      • Location3D
      • Vector3D
      • VectorGeoc3D
      • VectorOffset3D
    • Simulation Objects
      • SimObject
      • this
    • Simulation Object Component Systems
      • ComponentSystem
      • SystemAttribute
      • SwingingArtPart
      • TranslatableArtPart
      • SensorGimbal
    • ScriptAnimationModel
    • AsyncJob
    • TranslatableStream
  • Modules (general usage: <module name>.<function name>(...))
    • execTool
    • fsm
    • fsm2
    • parseUtil
    • spatialUtil
  • Packages of functions (usage: <function name>(...))
    • aggregateUtils
    • airportDataUtils
    • fileUtils
    • munitionLauncherUtils
    • pathUtil
    • vrfUtil
  • Documentation
    • Set Catalog
    • Task Catalog
    • How to Print

Table of Contents

!HowToPrint This section of the Lua API documentation does not describe a module of code; its purpose is to collect the information on print-related functions in other modules into one place.
!Set Catalog This section lists all the built in set-data command names, and the arguments each one accepts.
!Task Catalog This section lists all the built in task names, and the arguments each one accepts.
AirRefuelSupplier The AirRefuelSupplier is a class of Lua object that controls the refuel points.
AsyncJob An AsyncJob represents a the status of a job that is running asynchronously to the Lua task.
ComponentSystem A component system is a capability that is assigned to the entity in the Entity Editor.
ExtendableArtPart The ExtendableArtPart is a class of Lua object that represents a rotating articulated part.
FeatureGeometry This module contains contains functions for operating on FeatureGeometry objects.
FeatureSet A FeatureSet is an object that contains a set of features.
Location3D This module contains functions for creating and operating on a 3D point object.
ScriptAnimationModel The DtScriptAnimationModel class refers to an animation model that can be used by a scripted task to animate an entity's movement.
SensorGimbal The SensorGimbal is a class of Lua object that represents a sensor that rotates on a gimbal.
SimObject The SimObject class refers to a single object in the simulation.
SwingingArtPart The SwingingArtPart is a class of Lua object that represents a rotating articulated part.
SystemAttribute This section of the Lua documentation lists the attributes that entity systems can provide in the componentSystem:getAttribute function.
See the ComponentSystem module documentation.
TranslatableArtPart The TranslatableArtPart is a class of Lua object that represents a translating articulated part.
TranslatableStream A TranslatableStream is a text stream class that can be translated by VR-Force for display in the GUI as text that is translated to the current language the user is displaying (as long as those translations exist.) See the VR-Forces Users Guide, section 2.5, for information about localizing the GUI.
Vector3D A Vector3D is a vector in earth-relative coordinates, e.g.
VectorGeoc3D A VectorGeoc3D is a straight line in space, unlike a Vector3D.
VectorOffset3D A VectorOffset3D is a direction vector that is relative to some direction specified by a Vector3D.
aggregateUtils AggregateUtils is a collection of tables and functions that provide useful capabilities and definitions related to aggregates.
airportDataUtils Functions that compute information of interest about airports and runways.
behaviorEngine This package implements a behavior engine aimed at supporting unit tasks.
dataFileUtils Contains utility functions for reading data from text files.
execTool A package of functions that supports the use of a single Lua function to describe the control flow of a scripted task.
fsm A design pattern for doing finite state machines (FSMs) in Lua.
fsm2 A design pattern for implementing finite state machines (FSMs) in Lua.
munitionLauncherUtils This package contains some functions that support munition-launching scripts such as Delayed_homing and Launch_ASW_Missile.
parseUtil Lua functions that assist with parsing of strings, especially from received messages.
pathUtil pathUtil is a collection of utility functions that help with path planning and ground-clamping points on a route.
rtdIntegrationUtil A set of utilities for executing flight subtasks when the RTD plugin is loaded.
spatialUtil Functions that compute things in space using points, vectors, etc.
this The 'this' object instance refers to the SimObject on which the script is running.
vrf This module defines API functions that pass information to and from the simulation without reference to a particular simulation object or other class instance.
vrfutil Vrfutil is a collection of tables and functions that provide useful capabilities and definitions to Lua scripts in VR-Forces.

Copyright© 2021 MAK Technologies, Inc. All rights reserved.