Difference between revisions of "MIST markerSetDefault"
From DCS World Wiki - Hoggitworld.com
(Created page with "{{Mission Scripting |fName= mist.marker.setDefault| |vNum = Mist 4.5 |desc= Sets user defined default values for fillColor, color, lineType, and fontSize for a passed coali...") |
|||
Line 59: | Line 59: | ||
|rtnExamples= | |rtnExamples= | ||
− | |example= The following sets the default fill color for the red team to hot pink. | + | |example= The following sets the default fill color for the red team to hot pink with no outline being rendered. |
<pre> | <pre> | ||
− | mist.marker.setDefault({red = {fillColor = {1, 0.412, 0.706}}}) | + | mist.marker.setDefault({red = {fillColor = {1, 0.412, 0.706}, lineType = 0}}) |
</pre> | </pre> | ||
Latest revision as of 08:27, 23 August 2021
mist.marker.setDefault
Added with: Mist 4.5 |
Description |
Sets user defined default values for fillColor, color, lineType, and fontSize for a passed coalition. When assigned mist.marker.add will use the changed value instead of the pre-defined default values if a given value is not defined. Table is indexed by coalition. |
Syntax |
boolean mist.marker.setDefault(table vars ) |
Valid Input Values: |
Valid countries:
red, blue, all, neutral
vars tables have the following recognized fields( required entries in blue, optional in green): vars = { color = table color, fillColor = table fillColor, lineType = number lineType, fontSize = number fontSize, }
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 same rules as color apply. lineType is the format the outline will be in. By default if not present the value used is 2. LineTypes: 0 No Line 1 Solid 2 Dashed 3 Dotted 4 Dot Dash 5 Long Dash 6 Two Dash fontSize size of the font for any text to be displayed. |
Return value: |
boolean |
Return example: |
Usage Examples: |
The following sets the default fill color for the red team to hot pink with no outline being rendered.
mist.marker.setDefault({red = {fillColor = {1, 0.412, 0.706}, lineType = 0}}) |
Notes: |
Related Functions |
markerAdd, drawShape, drawZone, remove, getNextID, markerGet, setDefault |