{"name":"BIS_fnc_drawArrow","operator":null,"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","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.74"}],"since":{"game":"arma3","name":"Arma 3","version":"1.74"},"arma3_since":"1.74","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"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","since":null,"effect":null,"exec":null,"params":[{"name":"from","type":"Array","optional":false,"default":null,"description":"arrow start position in format [x,y] or [x,y,z]","types":["Array"],"since":null,"text":"from: Array - arrow start position in format [x,y] or [x,y,z]"},{"name":"to","type":"Array","optional":false,"default":null,"description":"arrow end position in format [x,y] or [x,y,z]","types":["Array"],"since":null,"text":"to: Array - arrow end position in format [x,y] or [x,y,z]"},{"name":"color","type":"Array format Color (RGBA)","optional":true,"default":"[1,1,1,1]","description":"arrow line or fill color","types":["Array","Color"],"since":null,"text":"color: Array format Color (RGBA) - (Optional, default [1,1,1,1]) arrow line or fill color"},{"name":"pars","type":"Array","optional":true,"default":null,"description":"arrow geometry details in format [arrowThickness, arrowHeadLengthCoef, arrowHeadWidthCoef], where:\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","types":["Array"],"since":null,"text":"pars: Array - (Optional) arrow geometry details in format [arrowThickness, arrowHeadLengthCoef, arrowHeadWidthCoef], where:\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","types":["Boolean"],"since":null,"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","types":["Control"],"since":null,"text":"map: Control - (Optional, default display 12 displayCtrl 51) map control"}],"returns":{"type":"Array","types":["Array"],"description":"arrow reference for removal in format [idd, idc, ehId] or empty array [] on removal operation","text":"Array - 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;"]},{"text":"```sqf\nmyArrow1 = [[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;\n```","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;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["drawArrow"],"notes":[],"categories":["Arma 3: Functions","Arma 3: New Functions","Function Group: Map and Markers","Functions","Introduced with Arma 3 version 1.74"],"docblock":null,"filled_from_docblock":[]}