Difference between revisions of "DCS func textToAll"
From DCS World Wiki - Hoggitworld.com
(Created page with "{{Template:dcs_funcs |fName= textToAll |vNum= 2.5.5 |par1= trigger.action |par2= |par3= |par4= |desc= Creates a text imposed on the map at a...") |
|||
(6 intermediate revisions by the same user not shown) | |||
Line 23: | Line 23: | ||
Id MUST be unique and is shared with the ids used with [[DCS_func_markToAll|mark panels]]. Likewise [[DCS_func_removeMark|trigger.action.removeMark]] is used to remove shapes created. | Id MUST be unique and is shared with the ids used with [[DCS_func_markToAll|mark panels]]. Likewise [[DCS_func_removeMark|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 format is {r, g, b, a} with values 0 to 1. A red line with 50% alpha would be {1, 0, 0, 0.5} | ||
− | colorFill | + | 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. | 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. | |
|rtnType= function | |rtnType= function | ||
Line 49: | Line 51: | ||
|reqName3= point | |reqName3= point | ||
− | | | + | |reqType4= table |
− | | | + | |reqName4= color |
− | | | + | |reqType5= table |
− | | | + | |reqName5= fillColor |
− | | | + | |reqType6= number |
− | | | + | |reqName6= fontSize |
− | | | + | |reqType7= boolean |
− | | | + | |reqName7= readOnly |
− | | | + | |reqType8= string |
− | | | + | |reqName8= text |
− | | | + | |reqType9= |
|optType1= | |optType1= | ||
− | |examples= | + | |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= | |related= | ||
[[DCS_singleton_trigger|'''Trigger Functions:''']] {{ListOfTriggerFuncs}} | [[DCS_singleton_trigger|'''Trigger Functions:''']] {{ListOfTriggerFuncs}} | ||
− | |notes= | + | |notes= |
− | |||
− | |||
}} | }} | ||
[[Category:Singleton Functions|textToAll]] | [[Category:Singleton Functions|textToAll]] | ||
+ | [[Category:Game Patch 2.5.5|textToAll]] |