Difference between revisions of "DCS func textToAll"
From DCS World Wiki - Hoggitworld.com
| (2 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} | ||
| Line 33: | Line 33: | ||
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 71: | Line 71: | ||
| − | |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]] | ||
