mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-21 07:30:48 +03:00
Update snap and vector build
Mady by @Victor-the-Cleaner
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
/*-----------------------------------*/
|
||||
// by strikerforce //
|
||||
/*--------------------------------*/
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Author: strikerforce
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
private ["_todo", "_selected"];
|
||||
|
||||
_todo = _this select 3 select 2;
|
||||
local _todo = _this select 3 select 2;
|
||||
|
||||
if (_todo == 0) then {
|
||||
vectorActionState = _this select 3 select 0;
|
||||
@@ -17,59 +17,59 @@ if (_todo == 0) then {
|
||||
};
|
||||
};
|
||||
|
||||
_selected = _this select 3 select 3;
|
||||
local _selected = _this select 3 select 3;
|
||||
|
||||
if (_todo == 1 || {_todo == 0}) then {
|
||||
if ((_todo == 1) || (_todo == 0)) then {
|
||||
call {
|
||||
if (vectorActionState == "Init") exitwith {
|
||||
if (vectorActionState == "Init") exitWith {
|
||||
vectorActionState = localize "STR_EPOCH_VECTORS_OPEN";
|
||||
[1,0] call fnc_vectorActionCleanup;
|
||||
|
||||
[] spawn {
|
||||
while {1==1} do {
|
||||
if (DZE_cancelBuilding || {!dayz_actionInProgress}) exitWith {
|
||||
if (DZE_cancelBuilding || !dayz_actionInProgress || DZE_nowBuilding) exitWith {
|
||||
[0,0] call fnc_vectorActionCleanup;
|
||||
vectorActionState = localize "STR_EPOCH_VECTORS_CLOSE";
|
||||
};
|
||||
|
||||
uisleep 2;
|
||||
uiSleep 0.5;
|
||||
};
|
||||
};
|
||||
};
|
||||
if (vectorActionState == localize "STR_EPOCH_VECTORS_OPEN") exitwith {
|
||||
if (vectorActionState == localize "STR_EPOCH_VECTORS_OPEN") exitWith {
|
||||
vectorActionState = localize "STR_EPOCH_VECTORS_CLOSE";
|
||||
[1,1] call fnc_vectorActionCleanup;
|
||||
};
|
||||
|
||||
if (vectorActionState == localize "STR_EPOCH_VECTORS_CLOSE") exitwith {
|
||||
if (vectorActionState == localize "STR_EPOCH_VECTORS_CLOSE") exitWith {
|
||||
vectorActionState = localize "STR_EPOCH_VECTORS_OPEN";
|
||||
[1,0] call fnc_vectorActionCleanup;
|
||||
};
|
||||
if (vectorActionState == localize "STR_EPOCH_VECTORS_PITCH_FORWARD") exitwith {
|
||||
if (vectorActionState == localize "STR_EPOCH_VECTORS_PITCH_FORWARD") exitWith {
|
||||
vectorActionState = localize "STR_EPOCH_VECTORS_CLOSE";
|
||||
[1,1] call fnc_vectorActionCleanup;
|
||||
DZE_updateVec = true;
|
||||
DZE_memForBack = DZE_memForBack + (DZE_curDegree * -1);
|
||||
DZE_memForBack = DZE_memForBack - DZE_curDegree;
|
||||
};
|
||||
if (vectorActionState == localize "STR_EPOCH_VECTORS_PITCH_BACK") exitwith {
|
||||
if (vectorActionState == localize "STR_EPOCH_VECTORS_PITCH_BACK") exitWith {
|
||||
vectorActionState = localize "STR_EPOCH_VECTORS_CLOSE";
|
||||
[1,1] call fnc_vectorActionCleanup;
|
||||
DZE_updateVec = true;
|
||||
DZE_memForBack = DZE_memForBack + DZE_curDegree;
|
||||
};
|
||||
if (vectorActionState == localize "STR_EPOCH_VECTORS_BANK_LEFT") exitwith {
|
||||
if (vectorActionState == localize "STR_EPOCH_VECTORS_BANK_LEFT") exitWith {
|
||||
vectorActionState = localize "STR_EPOCH_VECTORS_CLOSE";
|
||||
[1,1] call fnc_vectorActionCleanup;
|
||||
DZE_updateVec = true;
|
||||
DZE_memLeftRight = DZE_memLeftRight + (DZE_curDegree * -1);
|
||||
DZE_memLeftRight = DZE_memLeftRight - DZE_curDegree;
|
||||
};
|
||||
if (vectorActionState == localize "STR_EPOCH_VECTORS_BANK_RIGHT") exitwith {
|
||||
if (vectorActionState == localize "STR_EPOCH_VECTORS_BANK_RIGHT") exitWith {
|
||||
vectorActionState = localize "STR_EPOCH_VECTORS_CLOSE";
|
||||
[1,1] call fnc_vectorActionCleanup;
|
||||
DZE_updateVec = true;
|
||||
DZE_memLeftRight = DZE_memLeftRight + DZE_curDegree;
|
||||
};
|
||||
if (vectorActionState == localize "STR_EPOCH_VECTORS_RESET") exitwith {
|
||||
if (vectorActionState == localize "STR_EPOCH_VECTORS_RESET") exitWith {
|
||||
vectorActionState = localize "STR_EPOCH_VECTORS_CLOSE";
|
||||
[1,1] call fnc_vectorActionCleanup;
|
||||
DZE_memForBack = 0;
|
||||
@@ -80,32 +80,32 @@ if (_todo == 1 || {_todo == 0}) then {
|
||||
};
|
||||
};
|
||||
|
||||
if (_todo == 2 || {_todo == 0}) then{
|
||||
if ((_todo == 2) || (_todo == 0)) then{
|
||||
call {
|
||||
if (degreeActionState == "Init") exitwith {
|
||||
if (degreeActionState == "Init") exitWith {
|
||||
degreeActionState = localize "STR_EPOCH_VECTORS_OPEN";
|
||||
[1,0] call fnc_degreeActionCleanup;
|
||||
[] spawn {
|
||||
while {1==1} do {
|
||||
if (DZE_cancelBuilding || {!dayz_actionInProgress}) exitWith {
|
||||
if (DZE_cancelBuilding || !dayz_actionInProgress || DZE_nowBuilding) exitWith {
|
||||
[0,0] call fnc_degreeActionCleanup;
|
||||
degreeActionState = localize "STR_EPOCH_VECTORS_CLOSE";
|
||||
};
|
||||
|
||||
uisleep 2;
|
||||
uiSleep 0.5;
|
||||
};
|
||||
};
|
||||
};
|
||||
if (degreeActionState == localize "STR_EPOCH_VECTORS_OPEN") exitwith {
|
||||
if (degreeActionState == localize "STR_EPOCH_VECTORS_OPEN") exitWith {
|
||||
degreeActionState = localize "STR_EPOCH_VECTORS_CLOSE";
|
||||
[1,1] call fnc_degreeActionCleanup;
|
||||
};
|
||||
|
||||
if (degreeActionState == localize "STR_EPOCH_VECTORS_CLOSE") exitwith {
|
||||
if (degreeActionState == localize "STR_EPOCH_VECTORS_CLOSE") exitWith {
|
||||
degreeActionState = localize "STR_EPOCH_VECTORS_OPEN";
|
||||
[1,0] call fnc_degreeActionCleanup;
|
||||
};
|
||||
if (degreeActionState == "SELECT") exitwith {
|
||||
if (degreeActionState == "SELECT") exitWith {
|
||||
degreeActionState = localize "STR_EPOCH_VECTORS_CLOSE";
|
||||
DZE_curDegree = _selected;
|
||||
[1,1] call fnc_degreeActionCleanup;
|
||||
|
||||
@@ -1,95 +1,115 @@
|
||||
/*-----------------------------------*/
|
||||
// by strikerforce //
|
||||
/*--------------------------------*/
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Author: strikerforce
|
||||
//
|
||||
// Updated by Victor the Cleaner
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
fnc_vectorActionCleanup = {
|
||||
private ["_s1","_s2","_staticRotate","_vector"];
|
||||
|
||||
_s1 = _this select 0;
|
||||
_s2 = _this select 1;
|
||||
_staticRotate = ["STR_EPOCH_VECTORS_PITCH_FORWARD","STR_EPOCH_VECTORS_PITCH_BACK","STR_EPOCH_VECTORS_BANK_LEFT","STR_EPOCH_VECTORS_BANK_RIGHT","STR_EPOCH_VECTORS_RESET"];
|
||||
local _ORA = "<t color='#ff8800'>"; // orange
|
||||
local _WHT = "<t color='#ffffff'>"; // white
|
||||
local _TAB = " ";
|
||||
local _END = "</t>";
|
||||
local _VEC = localize "STR_EPOCH_ACTION_VECTORS";
|
||||
local _txt = "";
|
||||
|
||||
local _s1 = _this select 0;
|
||||
local _s2 = _this select 1;
|
||||
|
||||
local _staticRotate = ["STR_EPOCH_VECTORS_PITCH_FORWARD","STR_EPOCH_VECTORS_PITCH_BACK","STR_EPOCH_VECTORS_BANK_LEFT","STR_EPOCH_VECTORS_BANK_RIGHT","STR_EPOCH_VECTORS_RESET"];
|
||||
|
||||
player removeAction s_player_toggleVector;
|
||||
s_player_toggleVector = -1;
|
||||
|
||||
if (count s_player_toggleVectors != 0) then {
|
||||
{player removeAction _x;} count s_player_toggleVectors;
|
||||
s_player_toggleVectors = [];
|
||||
vectorActions = -1;
|
||||
};
|
||||
{player removeAction _x;} count s_player_toggleVectors;
|
||||
vectorActions = -1;
|
||||
|
||||
if (_s1 > 0) then {
|
||||
s_player_toggleVector = player addaction [format["<t color=""#ff8800"">" + localize "STR_EPOCH_ACTION_VECTORS" + " %1" +"</t>",vectorActionState],"\z\addons\dayz_code\compile\BuildVectors\build_vectors.sqf",[vectorActionState,degreeActionState,1],7,false,false];
|
||||
_txt = format[_ORA + _VEC + " %1" + _END, vectorActionState];
|
||||
s_player_toggleVector = player addAction [_txt, "\z\addons\dayz_code\compile\BuildVectors\build_vectors.sqf",[vectorActionState,degreeActionState,1],7,false,false];
|
||||
};
|
||||
if (_s2 > 0) then {
|
||||
s_player_toggleVectors = [];
|
||||
{
|
||||
_vector = localize _x;
|
||||
vectorActions = player addaction [format["<t color=""#ffffff"">" + " %1" +"</t>",_vector],"\z\addons\dayz_code\compile\BuildVectors\build_vectors.sqf",[_vector,degreeActionState,1],6,false,false];
|
||||
s_player_toggleVectors set [count s_player_toggleVectors,vectorActions];
|
||||
local _vector = localize _x;
|
||||
|
||||
_txt = format[_WHT + _TAB + "%1" + _END, _vector];
|
||||
vectorActions = player addAction [_txt, "\z\addons\dayz_code\compile\BuildVectors\build_vectors.sqf",[_vector,degreeActionState,1],6,false,false];
|
||||
|
||||
s_player_toggleVectors set [count s_player_toggleVectors, vectorActions];
|
||||
} count _staticRotate;
|
||||
};
|
||||
};
|
||||
|
||||
fnc_degreeActionCleanup = {
|
||||
private ["_s1","_s2"];
|
||||
|
||||
_s1 = _this select 0;
|
||||
_s2 = _this select 1;
|
||||
local _ORA = "<t color='#ff8800'>"; // orange
|
||||
local _RED = "<t color='#ff0000'>"; // red
|
||||
local _WHT = "<t color='#ffffff'>"; // white
|
||||
local _GRN = "<t color='#20E020'>"; // green
|
||||
local _DEG = localize "STR_EPOCH_VECTORS_DEGREES";
|
||||
local _SEL = localize "STR_EPOCH_ACTION_SNAP_SELECT";
|
||||
local _TAB = " ";
|
||||
local _END = "</t>";
|
||||
local _txt = "";
|
||||
|
||||
local _s1 = _this select 0;
|
||||
local _s2 = _this select 1;
|
||||
|
||||
player removeAction s_player_toggleDegree;
|
||||
s_player_toggleDegree = -1;
|
||||
|
||||
if (count s_player_toggleDegrees != 0) then {
|
||||
{player removeAction _x;} count s_player_toggleDegrees;
|
||||
s_player_toggleDegrees = [];
|
||||
degreeActions = -1;
|
||||
};
|
||||
{player removeAction _x;} count s_player_toggleDegrees;
|
||||
degreeActions = -1;
|
||||
|
||||
if (_s1 > 0) then {
|
||||
s_player_toggleDegree = player addaction [format["<t color=""#ff8800"">" + localize "STR_EPOCH_VECTORS_DEGREES" + " %1" +"</t>",degreeActionState],"\z\addons\dayz_code\compile\BuildVectors\build_vectors.sqf",[vectorActionState,degreeActionState,2],5,false,false];
|
||||
_txt = format[_ORA + _DEG + " %1" + _END, degreeActionState];
|
||||
s_player_toggleDegree = player addAction [_txt, "\z\addons\dayz_code\compile\BuildVectors\build_vectors.sqf",[vectorActionState,degreeActionState,2],5,false,false];
|
||||
};
|
||||
if (_s2 > 0) then {
|
||||
s_player_toggleDegrees = [];
|
||||
{
|
||||
if (DZE_curDegree == _x) then {
|
||||
degreeActions = player addaction [format["<t color=""#ff0000"">" + " " + localize "STR_EPOCH_ACTION_SNAP_SELECT" + " %1" +"</t>",_x],"\z\addons\dayz_code\compile\BuildVectors\build_vectors.sqf",[vectorActionState,"SELECT",2,_x],4,false,false];
|
||||
} else {
|
||||
degreeActions = player addaction [format["<t color=""#ffffff"">" + " " + localize "STR_EPOCH_ACTION_SNAP_SELECT" + " %1" +"</t>",_x],"\z\addons\dayz_code\compile\BuildVectors\build_vectors.sqf",[vectorActionState,"SELECT",2,_x],4,false,false];
|
||||
};
|
||||
local _COL = _WHT;
|
||||
if (DZE_curDegree == _x) then {_COL = _RED;};
|
||||
|
||||
s_player_toggleDegrees set [count s_player_toggleDegrees,degreeActions];
|
||||
_txt = format[_TAB + _COL + _SEL + " %1" + _END, _x];
|
||||
degreeActions = player addAction [_txt, "\z\addons\dayz_code\compile\BuildVectors\build_vectors.sqf",[vectorActionState,"SELECT",2,_x],4,false,false];
|
||||
|
||||
s_player_toggleDegrees set [count s_player_toggleDegrees, degreeActions];
|
||||
} count DZE_vectorDegrees;
|
||||
};
|
||||
};
|
||||
|
||||
fnc_SetPitchBankYaw = {
|
||||
private ["_sinaroundX","_cosaroundX","_dirY","_dirZ","_upY","_upZ","_sinaroundY","_cosaroundY","_dirX","_upX","_sinaroundZ","_cosaroundZ","_dirXTemp","_upXTemp","_object","_rotations","_aroundX","_aroundY","_aroundZ","_dir","_up"];
|
||||
|
||||
_object = _this select 0;
|
||||
_rotations = _this select 1;
|
||||
_aroundX = _rotations select 0;
|
||||
_aroundY = _rotations select 1;
|
||||
_aroundZ = (360 - (_rotations select 2)) - 360;
|
||||
local _object = _this select 0;
|
||||
local _rotations= _this select 1;
|
||||
|
||||
_dirX = 0;
|
||||
_dirY = 1;
|
||||
_dirZ = 0;
|
||||
_upX = 0;
|
||||
_upY = 0;
|
||||
_upZ = 1;
|
||||
local _aroundX = _rotations select 0;
|
||||
local _aroundY = _rotations select 1;
|
||||
local _aroundZ = -(_rotations select 2);
|
||||
|
||||
local _dirX = 0;
|
||||
local _dirY = 1;
|
||||
local _dirZ = 0;
|
||||
local _upX = 0;
|
||||
local _upY = 0;
|
||||
local _upZ = 1;
|
||||
|
||||
if (_aroundX != 0) then {
|
||||
_sinaroundX = sin _aroundX;
|
||||
_cosaroundX = cos _aroundX;
|
||||
local _sinaroundX = sin _aroundX;
|
||||
local _cosaroundX = cos _aroundX;
|
||||
_dirY = _cosaroundX;
|
||||
_dirZ = _sinaroundX;
|
||||
_upY = -(_sinaroundX);
|
||||
_upY = -_sinaroundX;
|
||||
_upZ = _cosaroundX;
|
||||
};
|
||||
|
||||
if (_aroundY != 0) then {
|
||||
_sinaroundY = sin _aroundY;
|
||||
_cosaroundY = cos _aroundY;
|
||||
local _sinaroundY = sin _aroundY;
|
||||
local _cosaroundY = cos _aroundY;
|
||||
_dirX = _dirZ * _sinaroundY;
|
||||
_dirZ = _dirZ * _cosaroundY;
|
||||
_upX = _upZ * _sinaroundY;
|
||||
@@ -97,17 +117,17 @@ fnc_SetPitchBankYaw = {
|
||||
};
|
||||
|
||||
if (_aroundZ != 0) then {
|
||||
_sinaroundZ = sin _aroundZ;
|
||||
_cosaroundZ = cos _aroundZ;
|
||||
_dirXTemp = _dirX;
|
||||
local _sinaroundZ = sin _aroundZ;
|
||||
local _cosaroundZ = cos _aroundZ;
|
||||
local _dirXTemp = _dirX;
|
||||
_dirX = (_dirXTemp * _cosaroundZ) - (_dirY * _sinaroundZ);
|
||||
_dirY = (_dirY * _cosaroundZ) + (_dirXTemp * _sinaroundZ);
|
||||
_upXTemp = _upX;
|
||||
local _upXTemp = _upX;
|
||||
_upX = (_upXTemp * _cosaroundZ) - (_upY * _sinaroundZ);
|
||||
_upY = (_upY * _cosaroundZ) + (_upXTemp * _sinaroundZ);
|
||||
};
|
||||
|
||||
_dir = [_dirX, _dirY, _dirZ];
|
||||
_up = [_upX, _upY, _upZ];
|
||||
local _dir = [_dirX, _dirY, _dirZ];
|
||||
local _up = [_upX, _upY, _upZ];
|
||||
_object setVectorDirAndUp [_dir, _up];
|
||||
};
|
||||
|
||||
201
SQF/dayz_code/compile/dze_snap_building.sqf
Normal file
201
SQF/dayz_code/compile/dze_snap_building.sqf
Normal file
@@ -0,0 +1,201 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Epoch Snap Building
|
||||
//
|
||||
// Author: Victor the Cleaner
|
||||
// Date: December 2021
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
local _distFromPlot = _this select 0;
|
||||
local _radius = _this select 1;
|
||||
local _snappingEnabled = _this select 2;
|
||||
local _vectoringEnabled = _this select 3;
|
||||
local _snapList = _this select 4;
|
||||
local _object = _this select 5;
|
||||
|
||||
local _header = "<img align='left' size='1' image='\z\addons\dayz_code\gui\EpochSnapBuilding.paa'></img><br/>";
|
||||
local _format = "<t align='left' size='0.4' font='Zeppelin33'>";
|
||||
local _COL = "<t shadow='2' color=";
|
||||
local _WHT = _COL + "'#E0E0E0'>"; // white '#FFFFFF'
|
||||
local _GRN = _COL + "'#20E020'>"; // green
|
||||
local _RED = _COL + "'#FF0000'>"; // red
|
||||
local _ORA = _COL + "'#FF8800'>"; // orange
|
||||
local _GRY = _COL + "'#808080'>"; // greyed out
|
||||
local _TRN = _format + "<t shadow='0' color='#00000000'>"; // transparent
|
||||
local _VEC = [_GRY, _WHT] select _vectoringEnabled; // initial text color
|
||||
local _END = "</t>"; // end of segment
|
||||
local _NL = _END + "<br/>"; // new line
|
||||
local _spacing = _TRN + "." + _NL; // blank line
|
||||
|
||||
local _strPitch = localize "STR_EPOCH_TUT_PITCH";
|
||||
local _strBank = localize "STR_EPOCH_TUT_BANK";
|
||||
local _strRotate = localize "STR_EPOCH_TUT_ROTATE";
|
||||
local _tab = localize "STR_EPOCH_TUT_KEY_TAB";
|
||||
local _PgUp = localize "STR_EPOCH_TUT_KEY_PGUP";
|
||||
local _PgDn = localize "STR_EPOCH_TUT_KEY_PGDN";
|
||||
local _hyphen = _WHT + "-" + _ORA;
|
||||
local _slash = _WHT + "/" + _ORA;
|
||||
local _colon = _WHT + ": ";
|
||||
local _pipe = _WHT + " | " + _ORA;
|
||||
local _na = _GRY + "-";
|
||||
local _OBR = _ORA + "[";
|
||||
local _WBR = _WHT + "]";
|
||||
local _DBR = "] [";
|
||||
local _BRW = "] " + _WHT;
|
||||
local _hpsp = _hyphen + _PgUp + _slash + _PgDn + _BRW;
|
||||
|
||||
local _HK = _OBR + _tab + _DBR + localize "STR_EPOCH_TUT_KEY_SHIFT" + _hyphen + _tab + _BRW + localize "STR_EPOCH_TUT_SNAP_NEXT_PREV" + _NL;
|
||||
_HK = _HK + _OBR + _PgUp + _DBR + _PgDn + _BRW + localize "STR_EPOCH_TUT_HEIGHT10" + _NL;
|
||||
_HK = _HK + _OBR + localize "STR_EPOCH_TUT_KEY_CTRL" + _hpsp + localize "STR_EPOCH_TUT_HEIGHT1" + _NL;
|
||||
_HK = _HK + _OBR + localize "STR_EPOCH_TUT_KEY_ALT" + _hpsp + localize "STR_EPOCH_TUT_HEIGHT100" + _NL;
|
||||
_HK = _HK + _OBR + localize "STR_EPOCH_TUT_KEY_ARROWS" + _BRW + _strPitch + " / " + _strBank + _NL;
|
||||
_HK = _HK + _ORA + "[Q] [E] " + _WHT + _strRotate + _NL;
|
||||
_HK = _HK + _ORA + "[-] [=] " + _WHT + localize "STR_EPOCH_TUT_ADJ_DEGREES" + _NL;
|
||||
_HK = _HK + _spacing;
|
||||
_HK = _HK + _ORA + "[L] " + _WHT + localize "STR_EPOCH_TUT_LOCAL" + " [%1"+ _NL;
|
||||
_HK = _HK + _ORA + "[T] " + _VEC + localize "STR_EPOCH_TUT_TERRAIN" + _NL;
|
||||
_HK = _HK + _ORA + "[P] " + _WHT + localize "STR_EPOCH_TUT_BOUNDARY" + _NL;
|
||||
_HK = _HK + _ORA + "[F] " + _WHT + localize "STR_EPOCH_TUT_RELEASE_HOLD" + _NL;
|
||||
_HK = _HK + _ORA + "[H] " + _WHT + localize "STR_EPOCH_TUT_HIDE_PANEL" + _NL;
|
||||
_HK = _HK + _spacing;
|
||||
_HK = _HK + _OBR + localize "STR_EPOCH_TUT_KEY_ESC" + _BRW + localize "STR_EPOCH_TUT_CANCEL" + _NL;
|
||||
_HK = _HK + _OBR + localize "STR_EPOCH_TUT_KEY_BACKSPACE" + _BRW + localize "STR_EPOCH_TUT_RESET" + _NL;
|
||||
_HK = _HK + _OBR + localize "STR_EPOCH_TUT_KEY_SPACEBAR" + _BRW + localize "STR_EPOCH_TUT_BUILD" + _END;
|
||||
|
||||
local _distance = 0;
|
||||
if (_distFromPlot != "0") then {
|
||||
_distance = _na;
|
||||
_radius = _na;
|
||||
} else {
|
||||
_radius = (str _radius) + "m";
|
||||
};
|
||||
|
||||
local _snapState = localize "STR_EPOCH_TUT_DISABLED";
|
||||
local _SNP = _GRY; // initial text color
|
||||
local _snapText = "";
|
||||
local _snapRange = "";
|
||||
local _snapMinIdx = 0;
|
||||
local _snapMaxIdx = (count _snapList) - 3; // 0-based index max
|
||||
local _pitch = 0;
|
||||
local _bank = 0;
|
||||
local _rotate = 0;
|
||||
local _localModeOn = _GRN + localize "STR_EPOCH_TUT_LOCAL_ON" + _WBR;
|
||||
local _localModeOff = _ORA + localize "STR_EPOCH_TUT_LOCAL_OFF" + _WBR;
|
||||
local _localText = "";
|
||||
|
||||
local _tutDistance = _ORA + localize "STR_EPOCH_TUT_DISTANCE" + _colon + "%1" + _pipe + localize "STR_EPOCH_TUT_RADIUS" + _colon + "%2" + _NL;
|
||||
local _tutSnapping = _ORA + localize "STR_EPOCH_TUT_SNAPPING" + _colon + "[%1" + _WHT + "]%2" + _NL;
|
||||
local _tutVectoring = _ORA + _strPitch + _colon + "%1" + _pipe + _strBank + _colon + "%2" + _pipe + _strRotate + _colon + "%3" + _NL;
|
||||
local _tutDegrees = _ORA + localize "STR_EPOCH_TUT_DEGREES" + _colon + "%1" + _NL;
|
||||
|
||||
while {1==1} do {
|
||||
|
||||
if (!dayz_actionInProgress || DZE_nowBuilding) exitWith {};
|
||||
|
||||
if (!DZE_HIDE_PANEL) then {
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Distance From Plot
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
if (_distFromPlot == "0") then {
|
||||
_distance = [distanceFromPlot, 1] call BIS_fnc_cutDecimals;
|
||||
if (_distance - (floor _distance) == 0) then {
|
||||
_distance = (str _distance) + ".0";
|
||||
};
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Snapping
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
if (_snappingEnabled && !skipUpdates) then {
|
||||
|
||||
local _OFF = snapActionState == localize "STR_EPOCH_ACTION_SNAP_OFF";
|
||||
local _ON = snapActionState == localize "STR_EPOCH_ACTION_SNAP_ON";
|
||||
local _SELECT = snapActionStateSelect == localize "STR_EPOCH_ACTION_SNAP_POINT_MANUAL";
|
||||
local _MANUAL = _ON && _SELECT;
|
||||
|
||||
call {
|
||||
if (_OFF) exitWith {DZE_SnapTabIdx = 0; DZE_SnapSelIdx = -2;}; // OFF
|
||||
if (_ON) exitWith {DZE_SnapTabIdx = 1; DZE_SnapSelIdx = -1;}; // ON/Auto
|
||||
if (_SELECT) exitWith {DZE_SnapTabIdx = DZE_SnapSelIdx + 2;}; // Selected
|
||||
};
|
||||
|
||||
_snapState = _snapList select DZE_SnapTabIdx;
|
||||
|
||||
call {
|
||||
if (_MANUAL) exitWith {_SNP = _GRN; _snapState = snapActionStateSelect;}; // Manual (Action Menu only)
|
||||
if (DZE_SnapTabIdx == 0) exitWith {_SNP = _ORA;}; // OFF
|
||||
if (DZE_SnapTabIdx == 1) exitWith {_SNP = _GRN;}; // Auto
|
||||
if (DZE_SnapTabIdx > 1) exitWith {_SNP = _GRN;}; // Selected
|
||||
};
|
||||
|
||||
_snapRange = "";
|
||||
|
||||
if ((DZE_SnapSelIdx >= _snapMinIdx) && (DZE_SnapSelIdx <= _snapMaxIdx)) then {
|
||||
_snapRange = " [ " + _GRN + "%1" + _WHT + " / %2 ]";
|
||||
_snapRange = format[_snapRange, DZE_SnapSelIdx + 1, _snapMaxIdx + 1];
|
||||
};
|
||||
};
|
||||
|
||||
_snapText = _SNP + _snapState;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Vectoring
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
_pitch = _VEC + str ([DZE_memForBack, 2] call BIS_fnc_cutDecimals);
|
||||
_bank = _VEC + str ([DZE_memLeftRight, 2] call BIS_fnc_cutDecimals);
|
||||
|
||||
if (!skipUpdates) then {
|
||||
_rotate = [DZE_memDir, 2] call BIS_fnc_cutDecimals;
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Local Mode
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
if (DZE_LOCAL_MODE) then {
|
||||
_localText = _localModeOn;
|
||||
} else {
|
||||
_localText = _localModeOff;
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dynamic Text
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
local _txt = _header + _format;
|
||||
|
||||
_txt = _txt + format[_tutDistance, _distance, _radius];
|
||||
_txt = _txt + format[_tutSnapping, _snapText, _snapRange];
|
||||
_txt = _txt + _spacing;
|
||||
_txt = _txt + format[_tutVectoring, _pitch, _bank, _rotate];
|
||||
_txt = _txt + format[_tutDegrees, DZE_curDegree];
|
||||
_txt = _txt + _spacing;
|
||||
_txt = _txt + format[_HK, _localText]; // hotkeys
|
||||
|
||||
local _screenX = 0.73 * safezoneW + safezoneX;
|
||||
local _screenY = 0.50 * safezoneH + safezoneY;
|
||||
local _duration = 0.1;
|
||||
local _fadeIn = 0;
|
||||
local _delta = 0;
|
||||
local _rscLayer = 17;
|
||||
|
||||
[_txt, _screenX, _screenY, _duration, _fadeIn, _delta, _rscLayer] spawn BIS_fnc_dynamicText;
|
||||
};
|
||||
|
||||
uiSleep 0.08;
|
||||
};
|
||||
@@ -18,140 +18,133 @@
|
||||
//
|
||||
// [] call fn_displayHelpers; // delete helpers
|
||||
//
|
||||
// - Helper texture values are defined in configVariables.sqf
|
||||
// - Helper texture values are defined in variables.sqf
|
||||
// - DZE_removeTexture = green | DZE_deconstructTexture = blue | DZE_NoRefundTexture = red
|
||||
// - If no texture is passed, it will default to green.
|
||||
// - If no identical object types are nearby, then do not display green helpers.
|
||||
// - If no identical class names are nearby, then do not display green helpers.
|
||||
// - Use DZE_displayOnlyIfNearby to enable/disable. Does not affect blue & green helpers.
|
||||
// - If the object's door is open during selection, no helper will display at that position.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
if (DZE_displayHelpers) then {
|
||||
if (!DZE_displayHelpers) exitWith {};
|
||||
|
||||
if (isNil "HelperArray") then {HelperArray = []};
|
||||
if (isNil "HelperArray") then {HelperArray = []};
|
||||
|
||||
local _p = count _this;
|
||||
local _p = count _this;
|
||||
|
||||
if (_p > 0) then {
|
||||
if (_p > 0) then {
|
||||
|
||||
local _obj = _this select 0; // selected object
|
||||
local _objType = typeOf _obj; // object's class name
|
||||
local _green = [0, format["#(argb,8,8,3)color(0,1,0,%1,ca)", (DZE_removeTransparency max 0.1)]]; // reformat with transparency
|
||||
local _helperTexture = DZE_removeTexture; // default: green
|
||||
local _object = _this select 0; // selected object
|
||||
local _typeOf = typeOf _object; // object's class name
|
||||
local _helperTexture = DZE_removeTexture; // default: green
|
||||
|
||||
if (_p == 2) then {
|
||||
_helperTexture = _this select 1; // specified texture
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// If no identical objects are nearby, then do not display green helpers
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
local _cancel = false;
|
||||
|
||||
if (DZE_displayOnlyIfNearby && [_helperTexture, DZE_removeTexture] call BIS_fnc_areEqual) then { // if only green required
|
||||
|
||||
local _radius = getNumber (configFile >> "HelperVectors" >> _objType >> "radius"); // get object's scan radius
|
||||
|
||||
if (_radius == 0) then {
|
||||
_radius = getNumber (configFile >> "SnapBuilding" >> _objType >> "radius"); // check here too
|
||||
};
|
||||
|
||||
local _objects = _obj nearObjects [_objType, _radius]; // get nearby objects
|
||||
|
||||
if (count _objects == 1) then { // if no identical objects are near
|
||||
_cancel = true; // do not display helpers
|
||||
};
|
||||
};
|
||||
if (_cancel) exitWith {};
|
||||
|
||||
local _helperSize = DZE_helperSizeDefault; // see configVariables.sqf
|
||||
local _helperClass = "";
|
||||
local _points = []; // vector array
|
||||
|
||||
_points = getArray (configFile >> "HelperVectors" >> _objType >> "points"); // get helper vector array
|
||||
|
||||
local _size = getNumber (configFile >> "HelperVectors" >> _objType >> "size"); // get size
|
||||
if (_size != 0) then {
|
||||
_helperSize = _size; // overwrite default size if it exists
|
||||
};
|
||||
|
||||
if (count _points > 0) then { // found helper vector
|
||||
|
||||
if (_objType in ["Concrete_Bunker_DZ","Concrete_Bunker_Locked_DZ","Door_DZ"]) exitWith{}; // exclude from helper removal
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Prevent floating helper
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// "DoorL" for MetalGate_DZ,
|
||||
// Land_DZE_WoodOpenTopGarageDoor,
|
||||
// Land_DZE_WoodOpenTopGarageLocked,
|
||||
// CinderGarageOpenTop_DZ,
|
||||
// CinderGarageOpenTopLocked_DZ
|
||||
// "dvere1" for Wooden_shed_DZ, Wooden_shed2_DZ
|
||||
// "open" for StorageShed_DZ, StorageShed2_DZ (Land_Shed_M01)
|
||||
// "Open_inner" for Metal_Drawbridge_DZ, Metal_DrawbridgeLocked_DZ
|
||||
// "Open_door" for default
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
local _resize = false;
|
||||
local _door = "Open_door";
|
||||
local _doorL = ["MetalGate_DZ","Land_DZE_WoodOpenTopGarageDoor","Land_DZE_WoodOpenTopGarageLocked","CinderGarageOpenTop_DZ","CinderGarageOpenTopLocked_DZ"];
|
||||
local _open = ["StorageShed_DZ","StorageShed2_DZ"];
|
||||
local _dvere1 = ["OutHouse_DZ"];
|
||||
local _custom1 = ["Wooden_shed_DZ","Wooden_shed2_DZ"];
|
||||
local _custom2 = ["Metal_Drawbridge_DZ","Metal_DrawbridgeLocked_DZ"];
|
||||
|
||||
call {
|
||||
if (_objType in _doorL) exitWith {_door = "doorl"};
|
||||
if (_objType in _open) exitWith {_door = "open"};
|
||||
if (_objType in _dvere1) exitWith {_door = "dvere1"};
|
||||
};
|
||||
call {
|
||||
if (_objType in _custom1 && _obj animationPhase "dvere1" < 1) exitWith {_resize = true}; // door is open
|
||||
if (_objType in _custom2 && _obj animationPhase "Open_inner" < 1) exitWith {_resize = true}; // door is open
|
||||
if (_obj animationPhase _door > 0) exitWith {_resize = true}; // door is open
|
||||
};
|
||||
if (_resize) then {
|
||||
_points resize (count _points) - 1; // do not display center helper
|
||||
};
|
||||
} else { // if no vector array exists
|
||||
_points = getArray (ConfigFile >> "SnapBuilding" >> _objType >> "points"); // try snapping points array
|
||||
};
|
||||
|
||||
{
|
||||
if (_helperSize == _x select 0) exitWith {
|
||||
_helperClass = _x select 1;
|
||||
}; // get helper class
|
||||
} count DZE_helperSize;
|
||||
|
||||
{
|
||||
local _helperObj = _helperClass createVehicleLocal [0,0,0]; // create helper object
|
||||
_helperObj setObjectTexture _helperTexture; // set colour
|
||||
|
||||
local _offset = +_x; // copy position array
|
||||
_offset resize 3; // truncate if necessary
|
||||
|
||||
local _pos = _obj modelToWorld _offset; // translate
|
||||
|
||||
if (surfaceIsWater _pos) then { // adjust for land and sea
|
||||
_pos set [2, (getPosASL _obj select 2) + (_offset select 2)];
|
||||
_helperObj setPosASL _pos;
|
||||
} else {
|
||||
_helperObj setPosATL _pos;
|
||||
};
|
||||
|
||||
HelperArray set [count HelperArray, _helperObj]; // record list of helpers
|
||||
} count _points; // if no vectors were found, do nothing
|
||||
|
||||
} else {
|
||||
|
||||
{deleteVehicle _x;} count HelperArray; // delete helpers
|
||||
HelperArray = [];
|
||||
if (_p == 2) then {
|
||||
_helperTexture = _this select 1; // specified texture
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// If no identical objects are nearby, then do not display green helpers
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
local _objects = [];
|
||||
|
||||
if (DZE_displayOnlyIfNearby && [_helperTexture, DZE_removeTexture] call BIS_fnc_areEqual) then { // if only green required
|
||||
|
||||
//
|
||||
// sizeOf and BIS_fnc_boundingBoxDimensions are not useful here, but boundingBox will work
|
||||
//
|
||||
local _box = boundingBox _object;
|
||||
local _b0 = _box select 0; // lower diagonal
|
||||
local _b1 = _box select 1; // upper diagonal
|
||||
local _bx = abs (_b0 select 0) + abs (_b1 select 0);
|
||||
local _by = abs (_b0 select 1) + abs (_b1 select 1);
|
||||
local _bz = abs (_b0 select 2) + abs (_b1 select 2);
|
||||
local _diag = sqrt (_bx^2 + _by^2 + _bz^2); // get diagonal of boundingBox
|
||||
local _radius = _diag + 0.5; // radius should extend just beyond diagonals
|
||||
_objects = _object nearObjects [_typeOf, _radius]; // get nearby objects
|
||||
};
|
||||
|
||||
if (count _objects == 1) exitWith {}; // if no identical objects are near, do not display helpers
|
||||
|
||||
local _helperSize = DZE_helperSizeDefault; // see configVariables.sqf
|
||||
local _helperClass = "";
|
||||
local _points = []; // vector array
|
||||
|
||||
_points = getArray (configFile >> "HelperVectors" >> _typeOf >> "points"); // get helper vector array
|
||||
|
||||
local _size = getNumber (configFile >> "HelperVectors" >> _typeOf >> "size"); // get size
|
||||
if (_size != 0) then {
|
||||
_helperSize = _size; // overwrite default size if it exists
|
||||
};
|
||||
|
||||
local _count = count _points;
|
||||
|
||||
if (_count > 0) then { // found helper vector
|
||||
|
||||
if (_typeOf in ["Concrete_Bunker_DZ","Concrete_Bunker_Locked_DZ","Door_DZ"]) exitWith{}; // exclude from helper removal
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Prevent floating helper
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// "DoorL" for MetalGate_DZ,
|
||||
// Land_DZE_WoodOpenTopGarageDoor,
|
||||
// Land_DZE_WoodOpenTopGarageLocked,
|
||||
// CinderGarageOpenTop_DZ,
|
||||
// CinderGarageOpenTopLocked_DZ
|
||||
// "dvere1" for Wooden_shed_DZ, Wooden_shed2_DZ
|
||||
// "open" for StorageShed_DZ, StorageShed2_DZ (Land_Shed_M01)
|
||||
// "Open_inner" for Metal_Drawbridge_DZ, Metal_DrawbridgeLocked_DZ
|
||||
// "Open_door" for default
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
local _resize = false;
|
||||
local _door = "Open_door";
|
||||
local _doorL = ["MetalGate_DZ","Land_DZE_WoodOpenTopGarageDoor","Land_DZE_WoodOpenTopGarageLocked","CinderGarageOpenTop_DZ","CinderGarageOpenTopLocked_DZ"];
|
||||
local _open = ["StorageShed_DZ","StorageShed2_DZ"];
|
||||
local _dvere1 = ["OutHouse_DZ"];
|
||||
local _custom1 = ["Wooden_shed_DZ","Wooden_shed2_DZ"];
|
||||
local _custom2 = ["Metal_Drawbridge_DZ","Metal_DrawbridgeLocked_DZ"];
|
||||
|
||||
call {
|
||||
if (_typeOf in _doorL) exitWith {_door = "doorl"};
|
||||
if (_typeOf in _open) exitWith {_door = "open"};
|
||||
if (_typeOf in _dvere1) exitWith {_door = "dvere1"};
|
||||
};
|
||||
call {
|
||||
if (_typeOf in _custom1 && _object animationPhase "dvere1" < 1) exitWith {_resize = true}; // door is open
|
||||
if (_typeOf in _custom2 && _object animationPhase "Open_inner" < 1) exitWith {_resize = true}; // door is open
|
||||
if (_object animationPhase _door > 0) exitWith {_resize = true}; // door is open
|
||||
};
|
||||
if (_resize) then {
|
||||
_points resize (_count - 1); // do not display center helper
|
||||
};
|
||||
} else { // if no vector array exists
|
||||
_points = getArray (configFile >> "SnapBuilding" >> _typeOf >> "points"); // use snapping points array
|
||||
};
|
||||
|
||||
{
|
||||
if (_helperSize == _x select 0) exitWith {
|
||||
_helperClass = _x select 1;
|
||||
}; // get helper class
|
||||
} count DZE_helperSize;
|
||||
|
||||
{
|
||||
local _helperObj = _helperClass createVehicleLocal [0,0,0]; // create helper object
|
||||
_helperObj setObjectTexture _helperTexture; // set colour
|
||||
_x resize 3; // remove snapping text if necessary
|
||||
_helperObj attachTo [_object, _x]; // translate
|
||||
|
||||
HelperArray set [count HelperArray, _helperObj]; // record list of helpers
|
||||
} count _points; // if no vectors were found, do nothing
|
||||
|
||||
} else {
|
||||
|
||||
{deleteVehicle _x;} count HelperArray; // delete helpers
|
||||
HelperArray = [];
|
||||
};
|
||||
|
||||
@@ -1,255 +1,260 @@
|
||||
/*-----------------------------------*/
|
||||
// by Raymix //
|
||||
// July 10 2014 //
|
||||
/*--------------------------------*/
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Author: Raymix
|
||||
// Date: July 10 2014
|
||||
//
|
||||
// Updated by Victor the Cleaner
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
fnc_snapActionCleanup = {
|
||||
private ["_s1","_s2","_s3","_cnt","_object","_classname","_objectHelper","_points"];
|
||||
local _s1 = _this select 0;
|
||||
local _s2 = _this select 1;
|
||||
local _s3 = _this select 2;
|
||||
local _object = _this select 3;
|
||||
local _classname = _this select 4;
|
||||
local _objectHelper = _this select 5;
|
||||
local _points = _this select 6;
|
||||
|
||||
_s1 = _this select 0;
|
||||
_s2 = _this select 1;
|
||||
_s3 = _this select 2;
|
||||
_object = _this select 3;
|
||||
_classname = _this select 4;
|
||||
_objectHelper = _this select 5;
|
||||
_points = _this select 6;
|
||||
local _WHT = "<t color='#ffffff'>";
|
||||
local _GRN = "<t color='#20E020'>";
|
||||
local _RED = "<t color='#ff0000'>";
|
||||
local _TB3 = " ";
|
||||
local _END = "</t>";
|
||||
local _txt = "";
|
||||
|
||||
player removeAction s_player_toggleSnap;
|
||||
s_player_toggleSnap = -1;
|
||||
|
||||
player removeAction s_player_toggleSnapSelect;
|
||||
s_player_toggleSnapSelect = -1;
|
||||
|
||||
if (count s_player_toggleSnapSelectPoint != 0) then {
|
||||
{
|
||||
player removeAction _x;
|
||||
} count s_player_toggleSnapSelectPoint;
|
||||
{player removeAction _x;} count s_player_toggleSnapSelectPoint;
|
||||
s_player_toggleSnapSelectPoint = [];
|
||||
snapActions = -1;
|
||||
|
||||
s_player_toggleSnapSelectPoint = [];
|
||||
snapActions = -1;
|
||||
};
|
||||
if (_s1 > 0) then {
|
||||
s_player_toggleSnap = player addaction [format["<t color=""#ffffff"">" + "Snap: %1" +"</t>",snapActionState],"\z\addons\dayz_code\actions\snap_build.sqf",[snapActionState,_object,_classname,_objectHelper,0],10,false,true];
|
||||
local _menuState = snapActionState;
|
||||
if (snapActionState == "Selected") then {_menuState = localize "STR_EPOCH_ACTION_SNAP_ON";};
|
||||
|
||||
_txt = format[_WHT + "Snap: %1" + _END, _menuState];
|
||||
s_player_toggleSnap = player addAction [_txt, "\z\addons\dayz_code\actions\snap_build.sqf", [_menuState, _object, _classname, _objectHelper, 0], 10, false, true];
|
||||
};
|
||||
if (_s2 > 0) then {
|
||||
s_player_toggleSnapSelect = player addaction [format["<t color=""#ffffff"">" + localize "STR_EPOCH_ACTION_SNAP_POINT" + " %1" +"</t>",snapActionStateSelect],"\z\addons\dayz_code\actions\snap_build.sqf",[snapActionStateSelect,_object,_classname,_objectHelper,0],9,false,true];
|
||||
local _COL = _GRN; // Auto
|
||||
if (snapActionState == "Selected") then {_COL = _WHT;}; // manual
|
||||
|
||||
_txt = format[_WHT + localize "STR_EPOCH_ACTION_SNAP_POINT" + _COL + " %1" + _END, snapActionStateSelect];
|
||||
s_player_toggleSnapSelect = player addAction [_txt, "\z\addons\dayz_code\actions\snap_build.sqf", [snapActionStateSelect, _object, _classname, _objectHelper, 0], 9, false, true];
|
||||
};
|
||||
if (_s3 > 0) then {
|
||||
s_player_toggleSnapSelectPoint = [];
|
||||
_cnt = 0;
|
||||
{
|
||||
snapActions = player addaction [format["<t color=""#ffffff"">" + " %1. " + localize "STR_EPOCH_ACTION_SNAP_SELECT" + " %2" + "</t>",_cnt+1,_x select 3],"\z\addons\dayz_code\actions\snap_build.sqf",["Selected",_object,_classname,_objectHelper,_cnt],8,false,false];
|
||||
s_player_toggleSnapSelectPoint set [count s_player_toggleSnapSelectPoint,snapActions];
|
||||
_cnt = _cnt + 1;
|
||||
} count _points;
|
||||
local _COL = _WHT;
|
||||
if (_forEachIndex == DZE_SnapSelIdx) then {_COL = _GRN;};
|
||||
|
||||
_txt = format[_TB3 + _COL + "%1. " + localize "STR_EPOCH_ACTION_SNAP_SELECT" + " %2" + _END, _forEachIndex + 1, _x select 3];
|
||||
snapActions = player addAction [_txt, "\z\addons\dayz_code\actions\snap_build.sqf", ["Selected", _object, _classname, _objectHelper, _forEachIndex], 8, false, false];
|
||||
|
||||
s_player_toggleSnapSelectPoint set [count s_player_toggleSnapSelectPoint, snapActions];
|
||||
} forEach _points;
|
||||
};
|
||||
};
|
||||
|
||||
fnc_initSnapPoints = {
|
||||
private ["_objectSnapGizmo","_object","_points"];
|
||||
|
||||
_object = _this select 0;
|
||||
_points = _this select 1;
|
||||
local _object = _this select 0;
|
||||
local _points = _this select 1;
|
||||
|
||||
snapGizmos = [];
|
||||
{
|
||||
_objectSnapGizmo = "Sign_sphere10cm_EP1" createVehicle [0,0,0];
|
||||
_objectSnapGizmo setobjecttexture [0,"#(argb,8,8,3)color(0.04,0.84,0.92,0.3,ca)"];
|
||||
_objectSnapGizmo attachTo [_object,[_x select 0,_x select 1,_x select 2]];
|
||||
snapGizmos set [count snapGizmos,_objectSnapGizmo];
|
||||
local _objectSnapGizmo = DZE_SNAP_HELPER_CLASS createVehicleLocal [0,0,0];
|
||||
_objectSnapGizmo setObjectTexture DZE_SNAP_POINT_RESET; // green
|
||||
_x resize 3; // remove text element
|
||||
_objectSnapGizmo attachTo [_object, _x];
|
||||
snapGizmos set [count snapGizmos, _objectSnapGizmo];
|
||||
} count _points;
|
||||
};
|
||||
|
||||
fnc_initSnapPointsNearby = {
|
||||
private ["_pos","_findWhitelisted","_pointsNearby","_nearbyObject","_objectSnapGizmo","_posNearby","_object","_whitelist","_radius"];
|
||||
local _object = _this select 0;
|
||||
local _findObjects = nearestObjects [_object, [], DZE_snapRadius] - [_object];
|
||||
|
||||
_object = _this select 0;
|
||||
_whitelist = _this select 1;
|
||||
_radius = _this select 2;
|
||||
|
||||
_pos = [_object] call FNC_GetPos;
|
||||
_findWhitelisted = [];
|
||||
_pointsNearby = [];
|
||||
_findWhitelisted = nearestObjects [_pos,_whitelist,(_radius + DZE_snapExtraRange)]-[_object];
|
||||
{deleteVehicle _x;} count snapGizmosNearby; // clean up previous radius
|
||||
snapGizmosNearby = [];
|
||||
{
|
||||
_nearbyObject = _x;
|
||||
_pointsNearby = getArray (configFile >> "SnapBuilding" >> (typeOf _x) >> "points");
|
||||
local _nearbyObject = _x;
|
||||
local _typeOf = typeOf _x;
|
||||
|
||||
local _pointsNearby = getArray (configFile >> "SnapBuilding" >> _typeOf >> "points");
|
||||
local _displayName = getText (configFile >> "CfgVehicles" >> _typeOf >> "displayName");
|
||||
{
|
||||
_objectSnapGizmo = "Sign_sphere10cm_EP1" createVehicle [0,0,0];
|
||||
_objectSnapGizmo setobjecttexture [0,"#(argb,8,8,3)color(0.04,0.84,0.92,0.3,ca)"];
|
||||
local _objectSnapGizmo = DZE_SNAP_HELPER_CLASS createVehicleLocal [0,0,0];
|
||||
_objectSnapGizmo setObjectTexture DZE_SNAP_POINT_RESET; // green
|
||||
_objectSnapGizmo setDir (_nearbyObject getVariable["memDir",0]);
|
||||
_posNearby = _nearbyObject modelToWorld [_x select 0,_x select 1,_x select 2];
|
||||
if (surfaceIsWater _posNearby) then {
|
||||
_objectSnapGizmo setPosASL [(_posNearby) select 0,(_posNearby) select 1,(getPosASL _nearbyObject select 2) + (_x select 2)];
|
||||
} else {
|
||||
_objectSnapGizmo setPosATL _posNearby;
|
||||
};
|
||||
snapGizmosNearby set [count snapGizmosNearby,_objectSnapGizmo];
|
||||
_objectSnapGizmo setVariable ["snappoint", [_displayName, _x select 3], false]; // store object and snapping point display names
|
||||
|
||||
_x resize 3; // remove text element
|
||||
_objectSnapGizmo attachTo [_nearbyObject, _x];
|
||||
|
||||
snapGizmosNearby set [count snapGizmosNearby, _objectSnapGizmo]; // rebuild helper list
|
||||
} count _pointsNearby;
|
||||
} forEach _findWhitelisted;
|
||||
} forEach _findObjects;
|
||||
};
|
||||
|
||||
fnc_initSnapPointsCleanup = {
|
||||
{detach _x; deleteVehicle _x;} count snapGizmos;
|
||||
{deleteVehicle _x;} count snapGizmos;
|
||||
snapGizmos = [];
|
||||
{detach _x; deleteVehicle _x;} count snapGizmosNearby;
|
||||
|
||||
{deleteVehicle _x;} count snapGizmosNearby;
|
||||
snapGizmosNearby = [];
|
||||
|
||||
snapActionState = localize "STR_EPOCH_ACTION_SNAP_OFF";
|
||||
};
|
||||
|
||||
fnc_snapDistanceCheck = {
|
||||
private ["_distClosestPointFound","_distCheck","_distClosest","_testXPos","_distClosestPointFoundPos","_distClosestPointFoundDir","_distClosestAttached","_distCheckAttached","_distClosestAttachedFoundPos","_onWater","_objectHelper","_object"];
|
||||
local _object = _this select 0;
|
||||
local _objectHelper = _this select 1;
|
||||
|
||||
_object = _this select 0;
|
||||
_objectHelper = _this select 1;
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// _snapObject function
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
while {snapActionState != localize "STR_EPOCH_ACTION_SNAP_OFF"} do {
|
||||
_distClosestPointFound = objNull;
|
||||
_distCheck = 0;
|
||||
_distClosest = 10;
|
||||
_testXPos = [];
|
||||
_distClosestPointFoundPos =[];
|
||||
_distClosestPointFoundDir = 0;
|
||||
_snapObject = {
|
||||
_objectHelper setPosASL (getPosASL _closestNearCurr); // snap object
|
||||
|
||||
{
|
||||
if (_x !=_distClosestPointFound) then {_x setobjecttexture [0,"#(argb,8,8,3)color(0.04,0.84,0.92,0.3,ca)"];};
|
||||
_testXPos = [_x] call FNC_GetPos;
|
||||
_distCheck = _objectHelper distance _testXPos;
|
||||
if (_distCheck < _distClosest) then {
|
||||
_distClosest = _distCheck;
|
||||
_distClosestPointFound setobjecttexture [0,"#(argb,8,8,3)color(0.04,0.84,0.92,0.3,ca)"];
|
||||
_distClosestPointFound = _x;
|
||||
_distClosestPointFound setobjecttexture [0,"#(argb,8,8,3)color(0,0.92,0.06,1,ca)"];
|
||||
DZE_memDir = getDir _closestNearCurr;
|
||||
[_objectHelper, [DZE_memForBack, DZE_memLeftRight, DZE_memDir]] call fnc_SetPitchBankYaw;
|
||||
|
||||
waitUntil {uiSleep 0.1; !helperDetach};
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// _uiSnapText function
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
_uiSnapText = {
|
||||
if (!DZE_uiSnapText) exitWith {};
|
||||
|
||||
local _pos = worldToScreen (_closestNearCurr modelToWorld [0,0,0]);
|
||||
|
||||
if (count _pos == 0) exitWith {}; // object may be off screen
|
||||
|
||||
local _screenX = (_pos select 0) - 0.5; // center to snap point
|
||||
local _screenY = (_pos select 1) - 0.06 * safeZoneH; // 6% of screen height
|
||||
|
||||
local _format = "<t align='Center' size='0.4' font='Zeppelin33' shadow='2' color=";
|
||||
local _WHT = _format + "'#E0E0E0'>";
|
||||
local _GRN = _format + "'#20E020'>";
|
||||
local _END = "</t>";
|
||||
local _NL = _END + "<br/>";
|
||||
local _txt = _WHT + "%1" + _NL + _WHT + (localize "STR_EPOCH_BUILD_UI_SNAP") + ": " + _GRN + "%2" + _END;
|
||||
|
||||
local _var = _closestNearCurr getVariable ["snappoint", ["",""]];
|
||||
|
||||
local _nearName = _var select 0;
|
||||
local _snapName = _var select 1;
|
||||
|
||||
if (_nearName == "") exitWith {};
|
||||
|
||||
local _txt = format[_txt, _nearName, _snapName];
|
||||
[_txt, _screenX, _screenY, 0.1, 0, 0, 18] spawn BIS_fnc_dynamicText;
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
local _OFF = localize "STR_EPOCH_ACTION_SNAP_OFF";
|
||||
local _MANUAL = localize "STR_EPOCH_ACTION_SNAP_POINT_MANUAL";
|
||||
|
||||
local _closestHeldPrev = objNull;
|
||||
local _closestNearPrev = objNull;
|
||||
|
||||
while {snapActionState != _OFF} do {
|
||||
|
||||
local _closestHeldCurr = objNull;
|
||||
local _closestNearCurr = objNull;
|
||||
local _closestDistance = DZE_snapDistance;
|
||||
|
||||
if (snapActionStateSelect == _MANUAL) then {
|
||||
|
||||
if (DZR_snapRefresh) exitWith {}; // currently refreshing
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Manual Snap
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
{ // scan all nearby points
|
||||
local _distance = _objectHelper distance _x; // compare to current selected
|
||||
|
||||
if (_distance < _closestDistance) then { // found a closer match
|
||||
_closestDistance = _distance;
|
||||
_closestNearCurr = _x; // update current
|
||||
};
|
||||
} count snapGizmosNearby;
|
||||
} forEach snapGizmosNearby;
|
||||
|
||||
if ((isNull _closestNearCurr) || {_closestNearCurr != _closestNearPrev}) then {
|
||||
_closestNearPrev setObjectTexture DZE_SNAP_POINT_RESET; // near OFF
|
||||
};
|
||||
if (!isNull _closestNearCurr) then {
|
||||
_closestNearCurr setObjectTexture DZE_SNAP_POINT_FOUND; // near ON
|
||||
_closestNearPrev = _closestNearCurr;
|
||||
|
||||
call _uiSnapText; // display text
|
||||
|
||||
if (!isNull _distClosestPointFound) then {
|
||||
if (snapActionStateSelect == localize "STR_EPOCH_ACTION_SNAP_POINT_MANUAL") then {
|
||||
if (helperDetach) then {
|
||||
_onWater = surfaceIsWater position _distClosestPointFound;
|
||||
_distClosestPointFoundDir = getDir _distClosestPointFound;
|
||||
if (_onWater) then {
|
||||
_distClosestPointFoundPos = getPosASL _distClosestPointFound;
|
||||
_objectHelper setPosASL _distClosestPointFoundPos;
|
||||
} else {
|
||||
_distClosestPointFoundPos = getPosATL _distClosestPointFound;
|
||||
_objectHelper setPosATL _distClosestPointFoundPos;
|
||||
};
|
||||
//_objectHelper setDir _distClosestPointFoundDir;
|
||||
DZE_memDir = _distClosestPointFoundDir;
|
||||
[_objectHelper,[DZE_memForBack,DZE_memLeftRight,DZE_memDir]] call fnc_SetPitchBankYaw;
|
||||
waitUntil {uiSleep 0.1; !helperDetach};
|
||||
call _snapObject; // snap object
|
||||
};
|
||||
} else {
|
||||
_distClosestAttached = objNull;
|
||||
_distCheckAttached = 0;
|
||||
_distClosest = 10;
|
||||
_distClosestAttachedFoundPos = [];
|
||||
};
|
||||
} else {
|
||||
|
||||
if (DZR_snapRefresh) exitWith {}; // currently refreshing
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Auto Snap
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
{
|
||||
local _nearCurr = _x; // scan all nearby points
|
||||
{
|
||||
if (_x !=_distClosestAttached) then {_x setobjecttexture [0,"#(argb,8,8,3)color(0.04,0.84,0.92,0.3,ca)"];};
|
||||
_testXPos = [_x] call FNC_GetPos;
|
||||
_distCheckAttached = _distClosestPointFound distance _testXPos;
|
||||
if (_distCheckAttached < _distClosest) then {
|
||||
_distClosest = _distCheckAttached;
|
||||
_distClosestAttached setobjecttexture [0,"#(argb,8,8,3)color(0.04,0.84,0.92,0.3,ca)"];
|
||||
_distClosestAttached = _x;
|
||||
_distClosestAttached setobjecttexture [0,"#(argb,8,8,3)color(0,0.92,0.06,1,ca)"];
|
||||
};
|
||||
local _distance = _nearCurr distance _x; // compare to all points of held object
|
||||
|
||||
if (_distance < _closestDistance) then { // found a closer match
|
||||
_closestDistance = _distance;
|
||||
_closestHeldCurr = _x; // update current
|
||||
_closestNearCurr = _nearCurr; // paired points
|
||||
};
|
||||
} count snapGizmos;
|
||||
} forEach snapGizmosNearby;
|
||||
|
||||
if ((isNull _closestHeldCurr) || {_closestHeldCurr != _closestHeldPrev}) then {
|
||||
_closestHeldPrev setObjectTexture DZE_SNAP_POINT_RESET; // held OFF
|
||||
};
|
||||
if ((isNull _closestNearCurr) || {_closestNearCurr != _closestNearPrev}) then {
|
||||
_closestNearPrev setObjectTexture DZE_SNAP_POINT_RESET; // near OFF
|
||||
};
|
||||
if (!isNull _closestNearCurr) then {
|
||||
_closestHeldCurr setObjectTexture DZE_SNAP_POINT_FOUND; // held ON
|
||||
_closestHeldPrev = _closestHeldCurr;
|
||||
|
||||
_closestNearCurr setObjectTexture DZE_SNAP_POINT_FOUND; // near ON
|
||||
_closestNearPrev = _closestNearCurr;
|
||||
|
||||
call _uiSnapText; // display text
|
||||
|
||||
if (helperDetach) then {
|
||||
_distClosestPointFoundDir = getDir _distClosestPointFound;
|
||||
_onWater = surfaceIsWater position _distClosestPointFound;
|
||||
if (_onWater) then {
|
||||
_distClosestPointFoundPos = getPosASL _distClosestPointFound;
|
||||
_distClosestAttachedFoundPos = getPosASL _distClosestAttached;
|
||||
detach _object;
|
||||
_objectHelper setPosASL _distClosestAttachedFoundPos;
|
||||
_object attachTo [_objectHelper];
|
||||
_objectHelper setPosASL _distClosestPointFoundPos;
|
||||
} else {
|
||||
_distClosestPointFoundPos = getPosATL _distClosestPointFound;
|
||||
_distClosestAttachedFoundPos = getPosATL _distClosestAttached;
|
||||
detach _object;
|
||||
_objectHelper setPosATL _distClosestAttachedFoundPos;
|
||||
_object attachTo [_objectHelper];
|
||||
_objectHelper setPosATL _distClosestPointFoundPos;
|
||||
};
|
||||
//_objectHelper setDir _distClosestPointFoundDir;
|
||||
DZE_memDir = _distClosestPointFoundDir;
|
||||
[_objectHelper,[DZE_memForBack,DZE_memLeftRight,DZE_memDir]] call fnc_SetPitchBankYaw;
|
||||
waitUntil {uiSleep 0.1; !helperDetach};
|
||||
detach _object;
|
||||
_objectHelper setPosASL (getPosASL _closestHeldCurr); // select snapping point on held object
|
||||
_object attachTo [_objectHelper];
|
||||
|
||||
call _snapObject; // snap object
|
||||
};
|
||||
};
|
||||
};
|
||||
uiSleep 0.1;
|
||||
};
|
||||
};
|
||||
|
||||
fnc_initSnapTutorial = {
|
||||
/*
|
||||
Shows help dialog for player ONCE per log in, explaining controls.
|
||||
Add snapTutorial = false; to your init.sqf to disable this tutorial completely.
|
||||
You can also add this bool to the end of this function to only show tutorial once per player login (not recommended)
|
||||
*/
|
||||
private ["_bldTxtSwitch","_bldTxtEnable","_bldTxtClrO","_bldTxtClrW","_bldTxtClrR","_bldTxtClrG","_bldTxtSz","_bldTxtSzT","_bldTxtShdw","_bldTxtAlgnL","_bldTxtUndrln","_bldTxtBold","_bldTxtFinal","_bldTxtStringTitle","_bldTxtStringSD","_bldTxtStringSE","_bldTxtStringSA","_bldTxtStringSM","_bldTxtStringPG","_bldTxtStringAPG","_bldTxtStringCPG","_bldTxtStringQE","_bldTxtStringQEF","_bldTxtStringFD","_bldTxtStringFS"];
|
||||
|
||||
if (isNil "snapTutorial") then {
|
||||
_bldTxtSwitch = _this select 0;
|
||||
_bldTxtEnable = _this select 1;
|
||||
_bldTxtClrO = "color='#ff8800'"; //orange
|
||||
_bldTxtClrW = "color='#ffffff'"; //white
|
||||
_bldTxtClrR = "color='#fd0a05'"; //red
|
||||
_bldTxtClrG = "color='#11ef00'"; //green
|
||||
_bldTxtSz = "size='0.76'"; //Title font size
|
||||
_bldTxtSzT = "size='0.4'"; //Text font size
|
||||
_bldTxtShdw = "shadow='1'"; //Font shadow
|
||||
_bldTxtAlgnL = "align='left'"; //Text align left
|
||||
_bldTxtUndrln = "underline='true'";
|
||||
_bldTxtBold = "font='Zeppelin33'"; //Bold text
|
||||
_bldTxtFinal = "";
|
||||
|
||||
//Delete on init
|
||||
17 cutRsc ["Default", "PLAIN"];
|
||||
uiSleep 0.1;
|
||||
|
||||
//Init Tutorial text
|
||||
if (_bldTxtEnable) then {
|
||||
_bldTxtStringTitle = format ["<t %1%2%3%4%6>Epoch<t %5%7> Snap Building</t></t><br />",_bldTxtClrW,_bldTxtSz,_bldTxtShdw,_bldTxtAlgnL,_bldTxtClrO,_bldTxtUndrln,_bldTxtBold];
|
||||
_bldTxtStringSD = format["<t %1%4%5%6>[Snap]<t %2> %7</t> <t %3>%8</t></t><br /><br />",_bldTxtClrO,_bldTxtClrR,_bldTxtClrW,_bldTxtSzT,_bldTxtShdw,_bldTxtAlgnL,localize "STR_EPOCH_SNAP_TUTORIAL_DISABLE",localize "STR_EPOCH_SNAP_TUTORIAL_DISABLE_MSG"];
|
||||
_bldTxtStringSE = format["<t %1%4%5%6>[Snap]<t %2> %7</t> <t %3>%8</t></t><br /><br />",_bldTxtClrO,_bldTxtClrG,_bldTxtClrW,_bldTxtSzT,_bldTxtShdw,_bldTxtAlgnL,localize "STR_EPOCH_SNAP_TUTORIAL_ENABLE",localize "STR_EPOCH_SNAP_TUTORIAL_ENABLE_MSG"];
|
||||
_bldTxtStringSA = format["<t %1%3%4%5>[Auto]<t %2>: %6</t></t><br /><br />",_bldTxtClrO,_bldTxtClrW,_bldTxtSzT,_bldTxtShdw,_bldTxtAlgnL,localize "STR_EPOCH_SNAP_TUTORIAL_AUTO_DETECT"];
|
||||
_bldTxtStringSM = format["<t %1%3%4%5>[%6]<t %2>: %7</t></t><br /><br />",_bldTxtClrO,_bldTxtClrW,_bldTxtSzT,_bldTxtShdw,_bldTxtAlgnL,localize "STR_EPOCH_ACTION_SNAP_POINT_MANUAL",localize "STR_EPOCH_SNAP_TUTORIAL_MANUAL_DETECT"];
|
||||
_bldTxtStringPG = format["<t %1%3%4%5>%6<t %2>: %7</t></t><br />",_bldTxtClrO,_bldTxtClrW,_bldTxtSzT,_bldTxtShdw,_bldTxtAlgnL,localize "STR_EPOCH_SNAP_TUTORIAL_PGUPPGDOWN",localize "STR_EPOCH_SNAP_TUTORIAL_PGUPPGDOWN_MSG"];
|
||||
_bldTxtStringAPG = format["<t %1%3%4%5>%6<t %2>: %7</t></t><br />",_bldTxtClrO,_bldTxtClrW,_bldTxtSzT,_bldTxtShdw,_bldTxtAlgnL,localize "STR_EPOCH_SNAP_TUTORIAL_ALT_PGUPPGDOWN",localize "STR_EPOCH_SNAP_TUTORIAL_ALT_PGUPPGDOWN_MSG"];
|
||||
_bldTxtStringCPG = format["<t %1%3%4%5>%6<t %2>: %7</t></t><br />",_bldTxtClrO,_bldTxtClrW,_bldTxtSzT,_bldTxtShdw,_bldTxtAlgnL,localize "STR_EPOCH_SNAP_TUTORIAL_CTRL_PGUPPGDOWN",localize "STR_EPOCH_SNAP_TUTORIAL_CTRL_PGUPPGDOWN_MSG"];
|
||||
_bldTxtStringQE = format["<t %1%3%4%5>[Q / E]<t %2>: %6</t></t><br />",_bldTxtClrO,_bldTxtClrW,_bldTxtSzT,_bldTxtShdw,_bldTxtAlgnL,localize "STR_EPOCH_SNAP_TUTORIAL_ROTATE180_MSG"];
|
||||
_bldTxtStringQEF = format["<t %1%3%4%5>[Q / E]<t %2>: %6</t></t><br /><br />",_bldTxtClrO,_bldTxtClrW,_bldTxtSzT,_bldTxtShdw,_bldTxtAlgnL,localize "STR_EPOCH_SNAP_TUTORIAL_ROTATE45_MSG"];
|
||||
_bldTxtStringFD = format["<t %1%3%4%5>[F]<t %2>: %6</t></t><br />",_bldTxtClrO,_bldTxtClrW,_bldTxtSzT,_bldTxtShdw,_bldTxtAlgnL,localize "STR_EPOCH_SNAP_TUTORIAL_F_DROP_MSG"];
|
||||
_bldTxtStringFS = format["<t %1%3%4%5>[F]<t %2>: %6</t></t><br />",_bldTxtClrO,_bldTxtClrW,_bldTxtSzT,_bldTxtShdw,_bldTxtAlgnL,localize "STR_EPOCH_SNAP_TUTORIAL_F_SNAP_MSG"];
|
||||
switch (_bldTxtSwitch) do {
|
||||
case "init": {
|
||||
_bldTxtFinal = _bldTxtStringTitle + _bldTxtStringSD + _bldTxtStringPG + _bldTxtStringAPG + _bldTxtStringCPG + _bldTxtStringQE + _bldTxtStringQEF + _bldTxtStringFD;
|
||||
};
|
||||
case "OnAuto": {
|
||||
_bldTxtFinal = _bldTxtStringTitle + _bldTxtStringSE + _bldTxtStringSA + _bldTxtStringPG + _bldTxtStringAPG + _bldTxtStringCPG + _bldTxtStringQE + _bldTxtStringQEF + _bldTxtStringFS;
|
||||
};
|
||||
case "manual": {
|
||||
_bldTxtFinal = _bldTxtStringTitle + _bldTxtStringSE + _bldTxtStringSM + _bldTxtStringPG + _bldTxtStringAPG + _bldTxtStringCPG + _bldTxtStringQE + _bldTxtStringQEF + _bldTxtStringFS;
|
||||
};
|
||||
};
|
||||
|
||||
[
|
||||
_bldTxtFinal, //structured text
|
||||
0.73 * safezoneW + safezoneX, //number - x
|
||||
0.65 * safezoneH + safezoneY, //number - y
|
||||
30, //number - duration
|
||||
1, // number - fade in time
|
||||
0, // number - delta y
|
||||
17 //number - layer ID
|
||||
] spawn bis_fnc_dynamicText;
|
||||
};
|
||||
|
||||
uiSleep 0.02;
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user