drawArrow: Difference between revisions

From Bohemia Interactive Community
No edit summary
mNo edit summary
 
Line 26: Line 26:
|p1= map: [[Control]]
|p1= map: [[Control]]


|p2= from: [[Object]] or [[Array]] format [[Position#Introduction|Position2D]] or [[Position#Introduction|Position3D]] - arrow start position
|p2= from: [[Object]] or [[Position#Introduction|Position2D]] or [[Position#Introduction|Position3D]] - arrow start position


|p3= to: [[Object]] or [[Array]] format [[Position#Introduction|Position2D]] or [[Position#Introduction|Position3D]] - arrow end position
|p3= to: [[Object]] or [[Position#Introduction|Position2D]] or [[Position#Introduction|Position3D]] - arrow end position


|p4= color: [[Array]] - arrow color in format [r,g,b,a]
|p4= color: [[Array]] - arrow color in format [r,g,b,a]

Latest revision as of 08:54, 2 January 2026

Hover & click on the images for description

Description

Description:
Draws a single line arrow on the map. As this command needs to be called every frame, it is preferable using the onDraw UI Event Handler. To draw a color filled arrow of custom shape see BIS_fnc_drawArrow.
Groups:
GUI Control - Map

Syntax

Syntax:
map drawArrow [from, to, color]
Parameters:
map: Control
from: Object or Position2D or Position3D - arrow start position
to: Object or Position2D or Position3D - arrow end position
color: Array - arrow color in format [r,g,b,a]
Return Value:
Nothing

Examples

Example 1:
findDisplay 12 displayCtrl 51 ctrlAddEventHandler ["Draw", { _this select 0 drawArrow [ player, player getRelPos [100, 0], [1,0,0,1] ]; }];

Additional Information

See also:
drawEllipse drawIcon drawLine drawRectangle drawPolygon drawTriangle drawXPolygon BIS_fnc_drawArrow

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord.
Only post proven facts here! Add Note
Waffle SS. - c
Posted on Jul 07, 2015 - 21:28 (UTC)
Be careful when using this command. Unlike map markers, the draw commands can decrease your framerate.