MIST msgBR

From DCS World Wiki - Hoggitworld.com


mist.msgBR

Added with: Mist 3.0
Description
Utilizes mist.getBRString and mist.message.add functions to display a coordinates in the bearing range format of the average position of units at the specified accuracy from the reference point via the mist message system to the specified recipients for the given displayTime. If text is provided, the coordinates will be added to the end of the text message.
Syntax
nothing mist.msgBR(table vars )
Valid Input Values:

vars tables have the following recognized fields( required entries in blue, optional in green):

 vars = 
 {
 units = UnitNameTable units, 
 ref = table ref, 
 displayTime = number displayTime, 
 msgFor = table msgFor,
 text = string text, 
 metric = boolean metric, 
 alt = boolean alt,
 }

units is a UnitNameTable- a table of unit names that follow a special set of rules (see the entry on UnitNameTables).

ref is the accuracy which the Bearing Range format will be displayed at

displayTime is the time in seconds the message will display for.

msgFor is the list of message recipients as outlined in the mist.message.add documenation

text is an optional variable of text to be displayed before the BR coordinates

metric is a boolean value that if present will display the coordinates using the metric system

alt is a boolean value that will display the message in Bearing Range Altitude Format

Return value:
nothing
Return example:
nothing
Usage Examples:
The following will return a ground groups bearing and range from a player aircraft.

 do
  mist.msgBR({
    units = mist.makeUnitTable('[g]targets'),
    ref = Unit.getByName('player'):getPosition().p,
    displayTime = 20,
    msgFor = {units = {'pilot1'}},
  })
 end
Notes:
Related Functions
messageAdd, removeById, remove , msgMGRS, msgLL, msgBR, msgBRA, msgBullseye, msgLeadingLL, msgLeadingMGRS, msgLeadingBR

Scripting Engine

MIST Root Page