Advertisement
Guest User

Untitled

a guest
Jun 5th, 2017
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.74 KB | None | 0 0
  1. _allobj = allmissionobjects "";
  2. _tempobj = [];
  3. _offset = 0;
  4. _ExportObjects = [];
  5. {
  6. if (!(isplayer _x) && !(_x iskindof "logic") && !(_x iskindof "CamCurator") && !(_x iskindof "CBA_NamespaceDummy")) then {
  7. _tempobj pushback _x;
  8. };
  9. } foreach _allobj;
  10. {
  11. _pos = getposWorld _x;
  12. _pos set [2,(_pos select 2)+_offset];
  13. _type = typeof _x;
  14. if (_type isequalto "") then {
  15. _type = _x;
  16. };
  17. _obj = [_type,_pos,getdir _x,[vectorDir _x, vectorup _x]];
  18. _ExportObjects pushback _obj;
  19. } foreach _tempobj;
  20.  
  21. _createcode = "
  22. if (!isserver) exitwith {};
  23. {
  24. private ['_object'];
  25. _p3d = ['.p3d', _x select 0] call BIS_fnc_inString;
  26. if (_p3d) then {
  27. _object = createsimpleobject [_x select 0,[0,0,0]];
  28. }
  29. else {
  30. _object = createVehicle [ _x select 0, [0,0,0], [], 0 , 'CAN_COLLIDE'];
  31. };
  32. if (count _x > 2) then {
  33. if (typename (_x select 2) == 'SCALAR') then {
  34. _object setdir (_x select 2);
  35. };
  36. if (typename (_x select 2) == 'array') then {
  37. _object setVectorDirAndUp (_x select 2);
  38. };
  39. };
  40. if (count _x > 3) then {
  41. if (typename (_x select 3) == 'array') then {
  42. _object setVectorDirAndUp (_x select 3);
  43. };
  44. };
  45. _object setPosWorld (_x select 1);
  46. _type = _x select 0;
  47. _simulate = true;
  48. if !(_type iskindof 'house') then {
  49. _object enableSimulationGlobal true;
  50. }
  51. else {
  52. _simulate = false;
  53. {
  54. _isin = [_x, tolower _type] call BIS_fnc_inString;
  55. if (_isin) exitwith {
  56. _simulate = true;
  57. };
  58. } foreach ['lamp','light','fuel','fire'];
  59. if (_simulate) then {
  60. _object enableSimulationGlobal true;
  61. }
  62. else {
  63. _object enableSimulationGlobal false;
  64. };
  65. };
  66. } forEach _objects;
  67. ";
  68.  
  69. ExportCode = format ["_objects = %1;%2",_ExportObjects,_createcode];
  70. copytoclipboard ExportCode;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement