drawTriangle: Difference between revisions
Lou Montana (talk | contribs) m (Text replacement - "{{HashLink" to "{{Link") |
Killzone Kid (talk | contribs) No edit summary |
||
(3 intermediate revisions by one other user not shown) | |||
Line 6: | Line 6: | ||
|gr1= GUI Control - Map | |gr1= GUI Control - Map | ||
|descr= [[ | |descr= [[File:drawTriangle.jpg|right|250px]] | ||
Draws one to multiple triangles on the map. | Draws one to multiple triangles on the map. | ||
{{Feature | informative | When {{hl|fill}} param is absent or is an empty string "", the triangle is drawn with lines of the color set in {{hl|color}} param. | {{Feature | informative | When {{hl|fill}} param is absent or is an empty string "", the triangle is drawn with lines of the color set in {{hl|color}} param. | ||
Line 41: | Line 41: | ||
</sqf> | </sqf> | ||
|seealso= [[drawArrow]] [[drawEllipse]] [[drawIcon]] [[drawLine]] [[drawPolygon]] [[drawRectangle]] | |seealso= [[drawArrow]] [[drawEllipse]] [[drawIcon]] [[drawLine]] [[drawPolygon]] [[drawRectangle]] [[drawXPolygon]] | ||
}} | }} | ||
Line 47: | Line 47: | ||
|user= Killzone_Kid | |user= Killzone_Kid | ||
|timestamp= 20170716153600 | |timestamp= 20170716153600 | ||
|text= Example [https://www.youtube.com/watch?v=gSiuLdUeq0M YouTube video] | |text= Example [https://www.youtube.com/watch?v{{=}}gSiuLdUeq0M YouTube video] | ||
<spoiler> | <spoiler> | ||
<sqf> | <sqf> | ||
Line 93: | Line 93: | ||
|user= Killzone_Kid | |user= Killzone_Kid | ||
|timestamp= 20181113210500 | |timestamp= 20181113210500 | ||
|text= Drawing holes ( | |text= Drawing holes ({{Link|https://www.youtube.com/watch?v{{=}}XZRtXsBFLAg|video}}): | ||
<spoiler> | <spoiler> | ||
<sqf> | <sqf> |
Latest revision as of 23:36, 1 November 2024
Description
- Description:
-
Draws one to multiple triangles on the map.
- Groups:
- GUI Control - Map
Syntax
- Syntax:
- map drawTriangle [vertices, color, fill]
- Parameters:
- map: Control - map control
- vertices: Array of Positions - triangle(s) vertices in multiple of 3, see Example 1 - if Position3D is provided for a vertex, its z value is ignored
- color: Array in format Color (RGBA)
- fill: String - (Optional, default "") fill texture file or Procedural Textures. See note in description for more info.
- Return Value:
- Nothing
Examples
- Example 1:
- CopyfindDisplay 12 displayCtrl 51 ctrlAddEventHandler ["Draw", { _this select 0 drawTriangle [ [ // triangle 1 start player getRelPos [100, 0], player getRelPos [100, -135], player getRelPos [100, 135] // triangle 1 end ], [1,0,0,0.5], "#(rgb,1,1,1)color(1,1,1,1)" ]; }];
Additional Information
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
- Posted on Jul 16, 2017 - 15:36 (UTC)
- Example YouTube video
- Posted on Nov 13, 2018 - 21:05 (UTC)
- Drawing holes (video):