DCS func textToAll

From DCS World Wiki - Hoggitworld.com

Scripting Root

Envrioment: Mission Scripting
Function: textToAll Added with: 2.5.5
Member Of: trigger.action
Syntax: function trigger.action.textToAll(number coalition , number id , vec3 point , table color , table fillColor , number fontSize , boolean readOnly , string text )
Description: Creates a text imposed on the map at a given point. Text scales with the map.

Coalition Ids to be used.

 -1 All
  0 Neutral
  1 Red
  2 Blue

Id MUST be unique and is shared with the ids used with mark panels. Likewise trigger.action.removeMark is used to remove shapes created.

point MUST be a vec3 table. {x, y z}

Color format is {r, g, b, a} with values 0 to 1. A red line with 50% alpha would be {1, 0, 0, 0.5}

color defines the color of the text to be displayed

colorFill will be the color of a rectangle over the area that the text covers.

readOnly denotes whether in the future if clients will be allowed to edit or remove the shape.

text corresponds to the message that is displayed on the map.


Return Value: function
Return Example: none
Examples: The following will render a circle and text moved to be above the circle based on the position of a zone.
local ref = trigger.misc.getZone("targetArea")
trigger.action.circleToAll(-1 , 1, ref.point , ref.radius , {0, 0, 0, 0} , {1, 0, 0, .7} , 0 , true)
local msg = "Some 20 year old static object"
local offset = {x = ref.point.x + ref.point.radius + 50, y = 0, z = ref.point.z - ((string.len(msg)/2)} 
trigger.action.textToAll(-1 , 2 , offset  , {1, 1, 1, .7} , {0, 0, 0, 0} , 20, true , msg )
Related Functions: Trigger Functions: ctfColorTag, getUserFlag, setUserFlag, getZone, explosion, smoke, effectSmokeBig, effectSmokeStop, illuminationBomb, signalFlare, radioTransmission, stopRadioTransmission, setUnitInternalCargo

outSound, outSoundForCoalition, outSoundForCountry, outSoundForGroup, outSoundForUnit, outText, outTextForCoalition, outTextForCountry, outTextForGroup, outTextForUnit

addOtherCommand, removeOtherCommand, addOtherCommandForCoalition, removeOtherCommandForCoalition, addOtherCommandForGroup, removeOtherCommandForGroup

markToAll, markToCoalition, markToGroup, removeMark, markupToAll, lineToAll, circleToAll, rectToAll, quadToAll, textToAll, arrowToAll, setMarkupRadius, setMarkupText, setMarkupFontSize, setMarkupColor, setMarkupColorFill, setMarkupTypeLine, setMarkupPositionEnd, setMarkupPositionStart

setAITask, pushAITask, activateGroup, deactivateGroup, setGroupAIOn, setGroupAIOff, groupStopMoving, groupContinueMoving

Notes: