Advertisement
Phronk

init3DEN.sqf

Jul 15th, 2023
419
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 1.50 KB | None | 0 0
  1. //OPTIMIZATIONS: Toggles some things off in the editor upon loading mission
  2. isNil{
  3.  
  4. 0 spawn{
  5.  
  6. set3DENLinesVisible[false,false];
  7. set3DENIconsVisible[false,false];
  8. set3DENModelsVisible[false,false];
  9. setObjectViewDistance[1200,1];
  10. setViewDistance 1200;
  11. setTerrainGrid 50;
  12.  
  13. waitUntil{ !isNil{profileNamespace getVariable "display3DEN_panelLeft"} };
  14. sleep 0.02;
  15.     if ( profileNamespace getVariable "display3DEN_panelLeft" ) then
  16.     {
  17.         [ "collapseEntityList" ] call BIS_fnc_3DENInterface;
  18.         sleep 0.0001;
  19.         [ "showPanelLeft" ] call BIS_fnc_3DENInterface;
  20.     } else {
  21.         [ "showPanelLeft" ] call BIS_fnc_3DENInterface;
  22.         sleep 0.0001;
  23.         [ "collapseEntityList" ] call BIS_fnc_3DENInterface;
  24.         sleep 0.0001;
  25.         [ "showPanelLeft" ] call BIS_fnc_3DENInterface;
  26.     };
  27.  
  28.     if ( profileNamespace getVariable "display3DEN_panelRight" ) then
  29.     {
  30.         [ "collapseAssetBrowser" ] call BIS_fnc_3DENInterface;
  31.         sleep 0.0001;
  32.         [ "showPanelRight" ] call BIS_fnc_3DENInterface;
  33.     };
  34.  
  35. [] call BIS_fnc_3DENDrawLocations;
  36. 1 call BIS_fnc_3DENFlashlight;
  37.  
  38.  
  39. //AUTOMATICALLY EXPORT TO MP WHEN YOU SAVE
  40. TFR_3DENSaved = false;
  41. add3DENEventHandler [ "OnMissionSave" ,
  42. {
  43.     if ( TFR_3DENSaved ) exitWith { };
  44.     TFR_3DENSaved = true;
  45.     0 spawn
  46.     {
  47.         sleep 1.5;
  48.  
  49.         do3DENAction "MissionExportMP";
  50.  
  51.         titleText
  52.         [
  53.             "<a font='PuristaBold' align='center' size='1.5' shadow='2'>Saved and Exported</a>" ,
  54.             "PLAIN" ,
  55.             0 ,
  56.             true ,
  57.             true
  58.         ];
  59.  
  60.         titleFadeOut 6;
  61.  
  62.         sleep 8;
  63.  
  64.         TFR_3DENSaved = false;
  65.     };
  66. }];
  67.  
  68. };
  69.  
  70. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement