drawLine: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(see also)
m (added example and removed note (put into description))
Line 7: Line 7:
____________________________________________________________________________________________
____________________________________________________________________________________________


| Draw a line on the map. |= Description
| Draw a line on the map. Can decrease framerate!|= Description
____________________________________________________________________________________________
____________________________________________________________________________________________


Line 21: Line 21:


|p5= color: [[Color]] |= Parameter 5
|p5= color: [[Color]] |= Parameter 5
|x1= <code>([[findDisplay]] 12 [[displayCtrl]] 51) [[ctrlAddEventHandler]] ["Draw","
(_this [[select]] 0) [[drawLine]] [
[[getPos]] [[player]],
[0,0,0],
[0,0,1,1]
];
"];</code> |Example 1=


| [[Nothing]] |= Return value
| [[Nothing]] |= Return value
Line 33: Line 41:
<!-- Note Section BEGIN -->
<!-- Note Section BEGIN -->


<dd class="notedate">Posted on March 22, 2014
<dt class="note">'''[[User:Waffle SS.|Waffle SS.]]'''
<dd class="note">Map example:<code>([[findDisplay]] 12 [[displayCtrl]] 51) [[ctrlAddEventHandler]] ["Draw","
([[_this]] [[select]] 0) [[drawLine]] [
[[getPos]] [[player]],
[0,0,0],
[0,0,1,1]
];
"];</code><BR>
Be careful when using this command. Unlike map markers, the draw commands can decrease your framerate.
<!-- Note Section END -->
</dl>


<h3 style="display:none">Bottom Section</h3>
<h3 style="display:none">Bottom Section</h3>

Revision as of 15:12, 6 June 2018

-wrong parameter ("Arma") defined!-1.00
Hover & click on the images for description

Description

Description:
Draw a line on the map. Can decrease framerate!
Groups:
Uncategorised

Syntax

Syntax:
map drawLine [position1, position2, color]
Parameters:
map: Control
[position1, position2, color]: Array
position1: Position2D, Position3D, Object
position2: Position2D, Position3D, Object
color: Color
Return Value:
Nothing

Examples

Example 1:
(findDisplay 12 displayCtrl 51) ctrlAddEventHandler ["Draw"," (_this select 0) drawLine [ getPos player, [0,0,0], [0,0,1,1] ]; "];

Additional Information

See also:
drawArrowdrawEllipsedrawIcondrawRectangledrawPolygondrawTriangle

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Notes

Bottom Section