Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- _allobj = allmissionobjects "";
- _tempobj = [];
- _offset = 0;
- _ExportObjects = [];
- {
- if (!(isplayer _x) && !(_x iskindof "logic") && !(_x iskindof "CamCurator") && !(_x iskindof "CBA_NamespaceDummy")) then {
- _tempobj pushback _x;
- };
- } foreach _allobj;
- {
- _pos = getposWorld _x;
- _pos set [2,(_pos select 2)+_offset];
- _type = typeof _x;
- if (_type isequalto "") then {
- _type = _x;
- };
- _obj = [_type,_pos,getdir _x,[vectorDir _x, vectorup _x]];
- _ExportObjects pushback _obj;
- } foreach _tempobj;
- _createcode = "
- if (!isserver) exitwith {};
- {
- private ['_object'];
- _p3d = ['.p3d', _x select 0] call BIS_fnc_inString;
- if (_p3d) then {
- _object = createsimpleobject [_x select 0,[0,0,0]];
- }
- else {
- _object = createVehicle [ _x select 0, [0,0,0], [], 0 , 'CAN_COLLIDE'];
- };
- if (count _x > 2) then {
- if (typename (_x select 2) == 'SCALAR') then {
- _object setdir (_x select 2);
- };
- if (typename (_x select 2) == 'array') then {
- _object setVectorDirAndUp (_x select 2);
- };
- };
- if (count _x > 3) then {
- if (typename (_x select 3) == 'array') then {
- _object setVectorDirAndUp (_x select 3);
- };
- };
- _object setPosWorld (_x select 1);
- _type = _x select 0;
- _simulate = true;
- if !(_type iskindof 'house') then {
- _object enableSimulationGlobal true;
- }
- else {
- _simulate = false;
- {
- _isin = [_x, tolower _type] call BIS_fnc_inString;
- if (_isin) exitwith {
- _simulate = true;
- };
- } foreach ['lamp','light','fuel','fire'];
- if (_simulate) then {
- _object enableSimulationGlobal true;
- }
- else {
- _object enableSimulationGlobal false;
- };
- };
- } forEach _objects;
- ";
- ExportCode = format ["_objects = %1;%2",_ExportObjects,_createcode];
- copytoclipboard ExportCode;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement