{"name":"BIS_fnc_drawArrow","title":"BIS fnc drawArrow","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_drawArrow","revid":352164,"updated":"2024-02-01T23:25:26Z","groups":["Map and Markers"],"status":"ok","games":{"arma3":"1.74"},"since":"arma3 1.74","arma3_since":"1.74","description":"Draws a static arrow (outline or color filled) on map. See Example 4 for arrow removal.\n\n> [!NOTE]\n> Note that the order in which arrows are added to map is reversed, the last added arrow will appear under the first added arrow","syntaxes":[{"syntax":"[from, to, color, pars, fill, map] call BIS_fnc_drawArrow","params":[{"name":"from","type":"Array","description":"arrow start position in format [x,y] or [x,y,z]","type_expr":"Array"},{"name":"to","type":"Array","description":"arrow end position in format [x,y] or [x,y,z]","type_expr":"Array"},{"name":"color","type":"Array format Color (RGBA)","optional":true,"default":"[1,1,1,1]","description":"arrow line or fill color","type_expr":"Color","types":["Array","Color"],"text":"color: Array format Color (RGBA) - (Optional, default [1,1,1,1]) arrow line or fill color"},{"name":"pars","type":"Array","optional":true,"description":"arrow geometry details in format [arrowThickness, arrowHeadLengthCoef, arrowHeadWidthCoef], where:\n\n- arrowThickness: Number - (Optional, default 10) arrow thickness in meters\n- arrowHeadLengthCoef: Number - (Optional, default 1/3) arrow head length compared to the total length of the arrow\n- arrowHeadWidthCoef: Number - (Optional, default 2) arrow head width compared to the arrow thickness\n- Arma 3 v1.98 arrowBaseWidthCoef: Number - (Optional, default 1) arrow base width compared to the arrow thickness","type_expr":"Array","text":"pars: Array - (Optional) arrow geometry details in format [arrowThickness, arrowHeadLengthCoef, arrowHeadWidthCoef], where:\n\n- arrowThickness: Number - (Optional, default 10) arrow thickness in meters\n- arrowHeadLengthCoef: Number - (Optional, default 1/3) arrow head length compared to the total length of the arrow\n- arrowHeadWidthCoef: Number - (Optional, default 2) arrow head width compared to the arrow thickness\n- Arma 3 v1.98 arrowBaseWidthCoef: Number - (Optional, default 1) arrow base width compared to the arrow thickness"},{"name":"fill","type":"Boolean","optional":true,"default":"true","description":"true to draw color filled arrow, false to draw outline","type_expr":"Boolean","text":"fill: Boolean - (Optional, default true) true to draw color filled arrow, false to draw outline"},{"name":"map","type":"Control","optional":true,"default":"display 12 displayCtrl 51","description":"map control","type_expr":"Control","text":"map: Control - (Optional, default display 12 displayCtrl 51) map control"}],"returns":{"type":"Array","type_expr":"Array","description":"arrow reference for removal in format [idd, idc, ehId] or empty array [] on removal operation"}}],"examples":[{"text":"Draw a semi-transparent, blue arrow with default geometry:\n\n```sqf\nmyArrow1 = [_pos1, _pos2, [0,0,1,0.5]] call BIS_fnc_drawArrow;\n```","code":["myArrow1 = [_pos1, _pos2, [0,0,1,0.5]] call BIS_fnc_drawArrow;"]},{"text":"Draw a wide, green arrow outline:\n\n```sqf\nmyArrow2 = [_pos1, _pos2, [0,1,0,1], [20], false] call BIS_fnc_drawArrow;\n```","code":["myArrow2 = [_pos1, _pos2, [0,1,0,1], [20], false] call BIS_fnc_drawArrow;"]},{"text":"Draw a thin, red arrow with custom head geometry:\n\n```sqf\nmyArrow3 = [_pos1, _pos2, [1,0,0,1], [1,1/5,5]] call BIS_fnc_drawArrow;\n```","code":["myArrow3 = [_pos1, _pos2, [1,0,0,1], [1,1/5,5]] call BIS_fnc_drawArrow;"]},{"text":"Remove the arrow created in Example 3:\n\n```sqf\nmyArrow3 call BIS_fnc_drawArrow;\n```","code":["myArrow3 call BIS_fnc_drawArrow;"]},{"code":["myArrow1 = [[100,400,0], [200,500,0], [1,0,0,1], [20], true] call BIS_fnc_drawArrow;\nmyArrow2 = [[400,700,0], [300,600,0], [0,1,0,1], [20, 1/3, 2, 2], true] call BIS_fnc_drawArrow;\nmyArrow3 = [[600,700,0], [400,900,0], [0,0,1,1], [20, 1/3, 2, 0.5], true] call BIS_fnc_drawArrow;\nmyArrow4 = [[100,100,0], [200,200,0], [0,0,0,1], [20], false] call BIS_fnc_drawArrow;\nmyArrow5 = [[400,400,0], [300,300,0], [1,1,1,1], [20, 1/3, 2, 2], false] call BIS_fnc_drawArrow;\nmyArrow6 = [[600,400,0], [400,600,0], [0,1,1,1], [20, 1/3, 2, 0.5], false] call BIS_fnc_drawArrow;"]}],"see_also":["drawArrow"]}