DrawBox
Appearance
| Environment: | Mission Scripting | |
|---|---|---|
| Function: | DrawBox | |
| Function Description: | Draws a rectangular cargo‑box marker on the map. The box is defined by its total width (xSize) and height (zSize) in metres, centred on the supplied position. | |
| File Location: | cmm.drawFunctions.lua | |
| Syntax: | CMM.DrawBox( table vec3 , number xSize , number zSize , table or string colour , table or string fillcolour , number coal ) | |
| Return Value: | number | |
| Parameters: | Name | Description |
| vec3 | World coordinates where the centre of the box should be placed. | |
| xSize | Total width of the box along the X‑axis (in metres). If omitted defaults to 100 m. | |
| zSize | Total height of the box along the Z‑axis (in metres). If omitted defaults to 100 m. | |
| colour | Outline colour. Accepts a colour table or one of the predefined names ("DarkBrown" by default). | |
| fillcolour | Interior fill colour. Defaults to CMM.Marker.Colour.CargoBrown. | |
| coal | Coalition for which the marker should be visible (-1 = all, 0 = neutral, 1 = Redfor, 2 = Blufor). Defaults to -1. | |
| Example: | CMM.DrawBox({x=500,y=0,z=-200}, 200, 150, "DarkBrown", "CargoBrown", 1) | |
| Example Description: | Draws a red‑for cargo box centred at (500, 0, −200) with a width of 200 m and height of 150 m. | |
| Related Functions: | ||
| Notes: | ||