MIST markerDrawShape

From DCS World Wiki - Hoggitworld.com


Added with: Mist 4.5
Function that draws a shape as defined in the mission editor by the drawing tools. By default it will inherit as many properties from the mission editor as possible. Any valid entry for mist.marker.add will be inherited by the shape.
table mist.marker.drawShape(string shapeName , table vars )
Valid Input Values:

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

 vars = 
 name/id = string/number name/id, 
 ignoreColor = boolean ignoreColor, 
 radius = number radius, 
 text = string text, 
 markFor = table markFor,
 markForCoa = number/string markForCoa, 
 color = table color,
 fillColor = table fillColor, 
 lineType = number lineType,
 readOnly = boolean readOnly,
 message = text message,
 fontSize = number fontSize,

name/id is used to identify the mark, can be used to replace marks already created.

ignoreColor is a boolean that if present the color of the zone as defined in the editor will be ignored.

radius is only relevant if a circle is passed. Radius of the circle to be drawn in meters

text is relevant to panels and text. Is a string of the text that is to be displayed

markFor accepts a string or a table of strings as keywords to define which groups will receive the message. This table can be use a variety of values to send the message to a very specific group of players. Acceptable values are in a table forma similar to the following:

  units = {...},  -- unit names. 
  coa = {...}, -- coa names 
  countries = {...}, -- country names 
  CA = {...}, -- looks just like coa. 
  unitTypes = { red = {TYPENAME}, blue = {}, all = {}, Russia = {},} 

markForCoa is simplified entry more meant for the shapes because the shapes can only be displayed to all or a specific coalition

color is the color of the outline of a shape in {r, g, b, alpha} table format. Values can are between 0 to 1. However mist supports 0-255 format. If the number is greater than 1 mist will assume it is in 0-255 format. By default if color is not defined mist will generate a color automatically based on who is to see the mark. 80% Red or Blue.

fillColor is the fill color for the shape. Same rules as stated above apply

lineType is the format the outline will be in. By default if not present the value used is 2.


0  No Line
1  Solid
2  Dashed
3  Dotted
4  Dot Dash
5  Long Dash
6  Two Dash

readOnly is a boolean value for whether or not the mark or shapes can be deleted by users. At present only applies to mark panels. If not present defaults to true.

message is text that will be displayed when the mark is created

fontSize is only relevant to the text shape. Defines how large of font will be used when displaying the text on the F10 map. If not present the default font size is 16.

Return value:
Return example:
Usage Examples:
Draws an oval shape created with the drawing tool named "ellipse" on the map.
Related Functions
markerAdd, drawShape, drawZone, remove, getNextID, markerGet, setDefault

Scripting Engine

MIST Root Page