Advertisement
Guest User

Untitled

a guest
May 26th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.77 KB | None | 0 0
  1. #define TIME_FACTOR 1.5 + random 4
  2.  
  3. setViewDistance 2500;
  4.  
  5. if (isServer) then {
  6. [{ [false] call potato_safeStart_fnc_toggleSafeStart }, [], 23] call CBA_fnc_waitAndExecute;
  7. waitUntil { !potato_safeStart_safeStartEnabled };
  8.  
  9. {
  10. deleteVehicle _x;
  11. } forEach [wall_1,wall_2,wall_3,wall_4,wall_5,wall_6,wall_7,wall_8];
  12.  
  13. private _vrObjects = [
  14. "Land_VR_Shape_01_cube_1m_F", "Land_VR_Block_04_F", "Land_VR_Block_05_F", "Land_VR_Block_02_F",
  15. "Land_VR_Block_03_F", "Land_VR_Block_01_F", "Land_VR_Slope_01_F", "Land_VR_CoverObject_01_kneelHigh_F",
  16. "Land_VR_CoverObject_01_standHigh_F", "Land_VR_CoverObject_01_kneel_F", "Land_VR_CoverObject_01_kneelLow_F", "Land_VR_CoverObject_01_stand_F"
  17. ];
  18.  
  19. private _blocks = [];
  20.  
  21. {
  22. if ((typeOf _x) in _vrObjects) then {
  23. _blocks pushBack _x;
  24. };
  25. } forEach allMissionObjects "House_F";
  26.  
  27. [{
  28. params ["_args"];
  29. _args params ["_blocks", "_startTime", ["_currentBlock", 0]];
  30. private _cOnTwo = (COLOUR_NUMBER) / 2;
  31. private _timeElapsed = (1.5 * cos deg ((CBA_missiontime - _startTime) * (TIME_FACTOR))) + 1.5;
  32. (_blocks select _currentBlock) setObjectTextureGlobal [1, format["#(argb,8,8,3)color(%1,%2,%3,%4)", parseNumber (_timeElapsed <= 1), parseNumber ((_timeElapsed <= 2) && (_timeElapsed > 1)), parseNumber (_timeElapsed > 2), 1]];
  33. (_blocks select _currentBlock) setObjectMaterialGlobal [1, "a3\characters_f_bootcamp\common\data\vrarmoremmisive.rvmat"];
  34. _currentBlock = _currentBlock + 1;
  35. if (_currentBlock >= (count _blocks)) then { _currentBlock = 0 };
  36. _args set [2, _currentBlock];
  37. }, 0, [_blocks, CBA_missiontime]] call CBA_fnc_addPerFrameHandler;
  38.  
  39. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement