Page MenuHomeFeedback Tracker

blckeagls
User

Projects

User does not belong to any projects.

User Details

User Since
Jan 26 2015, 7:10 AM (482 w, 3 d)

Recent Activity

May 10 2016

blckeagls added a comment to T81116: Significant Figures (issue with Cos and Sin).

My Code:

private ["_Dik","_DikCode","_acceptableCodes","_add","_addtoXfront","_addtoXside","_addtoYfront","_addtoYside","_altState","_bldgDir","_bldgDir-90","_cosfront","_cosside","_ctrlState","_pos","_shiftState","_sinfront","_sinside","_this"];
systemChat(format["_this passed: %1",_this]);
_Dik = _this select 0;
systemChat(format["BuildObj passed: %1",BuildObj]);
_DikCode = _Dik select 1; integer
systemChat(format["_DikCode passed: %1",_DikCode]);
_shiftState = _Dik select 2; boolean
_ctrlState = _Dik select 3;
boolean
_altState = _Dik select 4; // boolean
_acceptableCodes = [199,210,207,211,16,18,201,209];

if (!(_DikCode in _acceptableCodes)) exitWith {};

_add = .001;
if (_shiftState) then {
_add = .01;
};
if (_ctrlState) then {
_add = .1;
};
if (_altState) then {
_add = 1;
};

_pos = getPosWorld BuildObj;
_xpos = _pos select 0;
_ypos = _pos select 1;
_zpos = _pos select 2;

if (_DikCode == 201) then {
BuildObj setPosWorld [_xpos,_ypos,_zpos + _add];
};
if (_DikCode == 209) then {
BuildObj setPosWorld [_xpos,_ypos,_zpos - _add];
};

_add = 1;
if (_shiftState) then {
_add = 5;
};
if (_ctrlState) then {
_add = 15;
};
if (_altState) then {
_add = 45;
};

if (_DikCode == 16) then {
["F",_add] execVM "A3ResourceWarCl\PlayerScripts\building\vectors\Yaw.sqf";
};
if (_DikCode == 18) then {
["B",_add] execVM "A3ResourceWarCl\PlayerScripts\building\vectors\Yaw.sqf";
};

_add = .01;
if (_shiftState) then {
_add = .1;
};
if (_ctrlState) then {
_add = 1;
};
if (_altState) then {
_add = 4;
};

_sinside = 0.000000000000000 + sin(Bldgyaw);
systemChat(format["_sinside: %1",_sinside]);
_cosside = 0.000000000000000 + cos(Bldgyaw);
systemChat(format["_cosside: %1",_cosside]);
_sinfront = 0.000000000000000 + sin(Bldgyaw-90);
systemChat(format["_sinfront: %1",_sinfront]);
_cosfront = 0.000000000000000 + cos(Bldgyaw-90);
systemChat(format["_cosfront: %1",_cosfront]);

if (_DikCode == 199) then {
BuildObj setPosWorld [_xpos + (_sinside * _add),_ypos + (_cosside * _add),_zpos];
};
if (_DikCode == 207) then {
BuildObj setPosWorld [_xpos - (_sinside * _add),_ypos - (_cosside * _add),_zpos];
};
if (_DikCode == 210) then {
BuildObj setPosWorld [_xpos + (_sinfront * _add),_ypos + (_cosfront * _add),_zpos];
};
if (_DikCode == 211) then {
BuildObj setPosWorld [_xpos - (_sinfront * _add),_ypos - (_cosfront * _add),_zpos];
};

May 10 2016, 10:20 AM · Arma 3
blckeagls edited Steps To Reproduce on T81116: Significant Figures (issue with Cos and Sin).
May 10 2016, 10:20 AM · Arma 3
blckeagls added a comment to T79242: lnbSort and lnbSortByValue for multicolumned Listboxes.

This should be easily added.. with a return variable on lbsort..
example:

_array = ["One","Two","Three"];
{
lbAdd [1500,_x];
} foreach _array;
_display = findDisplay 734234;
_ctrl = _display displayctrl 1500;
_order = lbSort _ctrl; //_order will be [1,3,2];

///////////*
Now I can use _order to sort other listboxes or controls
*
///////////

May 10 2016, 9:14 AM · Arma 3