Jump to content
Sign in to follow this  
ArMaTeC

BIKIdrawTriangle

Recommended Posts

← Older revision Revision as of 15:37, 16 July 2017
(One intermediate revision by the same user not shown)
Line 56: Line 56:
 
[[Category:Command_Group:_GUI_Control|{{uc:{{PAGENAME}}}}]]
 
[[Category:Command_Group:_GUI_Control|{{uc:{{PAGENAME}}}}]]
 
[[Category:Command_Group:_Editor_Control|{{uc:{{PAGENAME}}}}]]
 
[[Category:Command_Group:_Editor_Control|{{uc:{{PAGENAME}}}}]]
  +
  +
<!-- CONTINUE Notes -->
  +
<dl class="command_description">
  +
<dd class="notedate">Posted on July 16, 2017 - 15:36 (UTC)</dd>
  +
<dt class="note">[[User:Killzone Kid|Killzone Kid]]</dt>
  +
<dd class="note">Example youtube video: [https://www.youtube.com/watch?v=gSiuLdUeq0M] <code>_ctrl = findDisplay 12 displayCtrl 51;
  +
_ctrl setVariable ["data", [1, "#(rgb,1,1,1)color(1,1,1,1)", 1000, position player,
  +
{
  +
params ["_p", "_r", "_a", "_sr", "_ba"];
  +
_sr = _r * 0.382;
  +
_pb = _p getPos [_sr, _a + 180];
  +
[
  +
_p getPos [_r, _a], _p getPos [_sr, _a + 36], _p getPos [_sr, _a - 36],
  +
_pb, _p getPos [_r, _a - 72], _p getPos [_r, _a + 72],
  +
_p getPos [_r, _a - 144], _p getPos [_sr, _a - 108], _pb,
  +
_p getPos [_r, _a + 144], _p getPos [_sr, _a + 108], _pb
  +
]
  +
}]];
  +
  +
_ctrl ctrlRemoveAllEventHandlers "Draw";
  +
_ctrl ctrlAddEventHandler ["Draw",
  +
{
  +
_map = _this select 0;
  +
_data = _map getVariable "data";
  +
_data params ["_i", "_fill", "_dist", "_pos", "_fn"];
  +
_data set [0, _i + 1];
  +
_size = _i % _dist;
  +
if (_size == 0) then
  +
{
  +
_data set [0, 1];
  +
_data set [1, ["#(rgb,1,1,1)color(1,1,1,1)", ""] select (random 1 < 0.3)];
  +
_data set [2, 250 + round random 750];
  +
};
  +
_alpha = linearConversion [_dist, 0, _dist - _size, 1, 0];
  +
_map drawEllipse [_pos, _size * 2, _size * 2, 0, [0,0,1,_alpha], _fill];
  +
_map drawTriangle [[_pos getPos [_size, -_size], _size, _size] call _fn, [1,0,0,_alpha], _fill];
  +
_map drawTriangle [[_pos getPos [_size, -_size + 120], _size, _size] call _fn, [0,1,0,_alpha], _fill];
  +
_map drawTriangle [[_pos getPos [_size, -_size - 120], _size, _size] call _fn, [1,1,0,_alpha], _fill];
  +
}];
  +
  +
openMap true;</code>
  +
</dd>
  +
</dl>
  +
<!-- DISCONTINUE Notes -->

View the full article

Share this post


Link to post
Share on other sites
Sign in to follow this  

×

Important Information

City Life RPG mod for ARMA 3
Copyright © 2017 City Life RPG. All rights reserved.
Registered with the UK Copyright Service. Registration No: 284659128

Positive SSL on a transparent background ipv6 ready DMCA.com Protection Status