dcsex.env
functions/classes to manipulate the game environment
Contents
Functions
_t.doRPC(ctx, cmd, valtype)
Parameters
- ctx
- the context to run
cmd
in - cmd
- the lua string to run in
ctx
- valtype
- the type of return value
Returns
- nil on error otherwise data in the requested type
_t.errtraceback(err, version, lvl)
Parameters
- err
- error object.
- version
- version string to output with the stack track.
- lvl
- level in the call stack to start the traceback or zero.
Returns
- string containing the stack trace
_t.errhandler(err, logger, lvl)
Parameters
- err
- error object.
- logger
- a dcsex.env.Logger object to print the trackback to.
- lvl
- level in the call stack to start the traceback or one.
_t.getStartTime(miztbl)
Calling ex.env.getStartTime() + timer.getAbsTime() is an easy way to get the current local time of the map.
Parameters
- miztbl
- a mission table entry or env for the currently loaded mission
Returns
- number in seconds since the OS epoch
_t.getZuluTime(abstime)
Parameters
- abstime
- local time in seconds
Returns
- utc time in seconds
_t.loadMission(fileName)
Parameters
- fileName
- Mission filename
_t.setBriefing(coaID, briefingText, imagePath)
Parameters
- coaID
- number
- briefingText
- string Briefing text, can contain newlines, will be converted formatted properly for DCS
- imagePath
- string file path, can be a file in the DEFAULT folder inside the .miz