7erra 629 Posted September 15, 2018 Hi everyone! Since I'm a noob with trigonometry I'd like to ask you how it is possible to draw the outline of a trigger with drawIcon3D. I have come so far that I can draw the border with predefined positions. params ["_trigger"]; //_tParams = triggerArea _trigger; //_tParams params ["_a","_b","_angle","_isRectangle","_c"]; _posArray = [ // predefined positions [4127,4112,1], [4127,4124,1], [4134,4124,1], [4134,4112,1] ]; _posArray apply {_x set [2,0.5]}; _posArray pushBack (_posArray select 0); _posArray = _posArray apply { if ((count _posArray) > _posArray find _x) then { [_x,_posArray select ((_posArray find _x) +1),[0,1,0,1]] } else { [_x,_posArray select 0,[0,1,0,1]] }; }; while {triggerActivated _trigger} do {// other option: eachFrame MEH, but the array will be evaluated over and over. seems redundant as the trigger wont move. Also arguments have to be passed. { drawLine3D _x; } forEach _posArray; _curFrame = diag_frameno; waitUntil {_curFrame != diag_frameno}; }; Thanks, 7erra 1 Share this post Link to post Share on other sites
Mr H. 402 Posted September 15, 2018 This will do just that: 3 2 Share this post Link to post Share on other sites
7erra 629 Posted September 16, 2018 ArmA rule #34: If it exists, there is code for it. If it isn't there will be. Would you mind if I used the code in my mod? 1 Share this post Link to post Share on other sites
Mr H. 402 Posted September 16, 2018 Not at all, but beware as mentioned in the thread it will throw divider by zero errors next to triggers with no shape. It's an easy fix but I've been too busy to implement it. Also if you re use it I just ask that you leave the author credits (as is good practice) especially since my girlfriend helped me with the maths on that one . 1 1 Share this post Link to post Share on other sites