BIS fnc drawArrow: Difference between revisions
Jump to navigation
Jump to search
m (Text replacement - "\[\[[cC]ategory:[fF]unctions\|\{\{uc:[a-z A-Z_]*\}\}\]\]" to "") |
m (Text replacement - "\[\[[cC]ategory:\{\{Name\|arma3\}\}: [fF]unctions\|\{\{uc:[a-z A-Z_]*\}\}\]\]" to "") |
||
Line 43: | Line 43: | ||
<dl class="command_description"> | <dl class="command_description"> | ||
</dl> | </dl> | ||
Revision as of 02:21, 2 February 2021
Description
- Description:
- Description needed
- Execution:
- call
- Groups:
- Map and Markers
Syntax
- Syntax:
- Syntax needed
- Parameters:
- from: Array - Arrow start position in format [x,y] or [x,y,z]
- to: Array - Arrow end position in format [x,y] or [x,y,z]
- color (Optional): Array - Arrow line or fill color in format [r,g,b,a]. Default: [1,1,1,1]
- pars (Optional): Array - Arrow geometry details in format [arrowThickness, arrowHeadLengthCoef, arrowHeadWidthCoef], where:
- arrowThickness (Optional): Number - Arrow thickness in meters. Default: 10
- arrowHeadLengthCoef (Optional): Number - Arrow head length compared to the total length of the arrow. Default: 1/3 (third of the length)
- arrowHeadWidthCoef (Optional): Number - Arrow head width compared to the arrow thickness. Default: 2 (twice as wide)
- arrowBaseWidthCoef (Optional): Number - Arrow base width compared to the arrow thickness. Default: 1 (same width) - Since Arma 3 v1.97
- fill (Optional): Boolean - true to draw color filled arrow, false to draw outline. Default: true
- map (Optional): Control - Map control. Default: control 51 of the main map display 12
- Return Value:
- Return value needed
Examples
- Example 1:
- Draw a semi-transparent, blue arrow with default geometry:
myArrow1 = [_pos1, _pos2, [0,0,1,0.5]] call BIS_fnc_drawArrow;
- Example 2:
- Draw a wide, green arrow outline:
myArrow2 = [_pos1, _pos2, [0,1,0,1], [20], false] call BIS_fnc_drawArrow;
- Example 3:
- Draw a thin, red arrow with custom head geometry:
myArrow3 = [_pos1, _pos2, [1,0,0,1], [1,1/5,5]] call BIS_fnc_drawArrow;
- Example 4:
- Remove the arrow created in Example 3:
myArrow3 call BIS_fnc_drawArrow;
- Example 5:
myArrow1 = [[100,400,0], [200,500,0], [1,0,0,1], [20], true] call BIS_fnc_drawArrow; myArrow2 = [[400,700,0], [300,600,0], [0,1,0,1], [20, 1/3, 2, 2], true] call BIS_fnc_drawArrow; myArrow3 = [[600,700,0], [400,900,0], [0,0,1,1], [20, 1/3, 2, 0.5], true] call BIS_fnc_drawArrow; myArrow4 = [[100,100,0], [200,200,0], [0,0,0,1], [20], false] call BIS_fnc_drawArrow; myArrow5 = [[400,400,0], [300,300,0], [1,1,1,1], [20, 1/3, 2, 2], false] call BIS_fnc_drawArrow; myArrow6 = [[600,400,0], [400,600,0], [0,1,1,1], [20, 1/3, 2, 0.5], false] call BIS_fnc_drawArrow;
Additional Information
- See also:
- See also needed
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