Envrioment: | Mission Scripting | ||
Function: | markupToAll | Added with: 2.5.6 | |
Member Of: | trigger.action | ||
Syntax: | function trigger.action.markupToAll(numbr shapeId , number coalition , number id , vec3 point1 , anyValid param... , table color , table fillColor , number lineType , boolean readOnly, string message) | ||
Description: | Creates the defined shape on the F10 map. Uses the same definitions as the specific functions to create different shapes with the only difference being the first parameter is used to define the shape. This function does have an additional type of shape of "freeform" which allows you to create an 3+ vertices shape in any format you wish.
Shape Ids: 1 Line 2 Circle 3 Rect 4 Arrow 5 Text 6 Quad 7 Freeform 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. startPoint and endPoint 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 is the color used for the outline around the shape. Colorfill corresponds to the shading of the shape LineType corresponds to an enumerator value. LineTypes: 0 No Line 1 Solid 2 Dashed 3 Dotted 4 Dot Dash 5 Long Dash 6 Two Dash readOnly denotes whether in the future if clients will be allowed to edit or remove the shape. Message corresponds to an message box that will appear when the shape is added.
| ||
Return Value: | function | ||
Return Example: | none | ||
Examples: | The following creates a freeform shape with 6 points defined by trigger zones with a light grey fill color and greenish blue outline:
trigger.action.markupToAll(7, -1, 1, trigger.misc.getZone('point1').point, trigger.misc.getZone('point2').point, trigger.misc.getZone('point3').point, trigger.misc.getZone('point4').point, trigger.misc.getZone('point5').point, trigger.misc.getZone('point6').point, {0, .6, .6, 1}, {0.8, 0.8, 0.8, .3}, 4) | ||
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: | In Single Player without an aircraft selected you can see objects assigned to display for coalitionId 0. In multiplayer only shapes assigned to id -1 and your coalition will be visible.
Creating a freeform shape that is convex will not |