tinboye 28 Posted March 28, 2017 is there anyway I can take this Spoiler _vehicle_2 = objNull; if (true) then { _this = createVehicle ["Land_R_Shed_Ind02", [11982.002, 12815.203, -0.12420972], [], 0, "CAN_COLLIDE"]; _vehicle_2 = _this; _this setDir 200.3562; _this setVehicleInit "this setvectorup [0,0,1]"; _this setPos [11982.002, 12815.203, -0.12420972]; }; or Spoiler _vehicle_12 = objNull; if (true) then { _this = createVehicle ["Land_HouseB_Tenement", [11214.148, 18388.43, -0.00012588501], [], 0, "CAN_COLLIDE"]; _vehicle_12 = _this; _this setDir 32.964344; _this setVehicleArmor 0.49999991; _this setFuel 0.51825774; _this setVehicleAmmo 0.50954628; _this setPos [11214.148, 18388.43, -0.00012588501]; }; and import into eden via the debug console? Share this post Link to post Share on other sites
Grumpy Old Man 3540 Posted March 28, 2017 Ctrl+C Ctrl+V Cheers Share this post Link to post Share on other sites
tinboye 28 Posted March 28, 2017 I tried running that in the debug console, and it does not create the object on the map. Share this post Link to post Share on other sites
das attorney 857 Posted March 28, 2017 setVehicleInit??? Isn't that Arma 2 code? 1 Share this post Link to post Share on other sites
tinboye 28 Posted March 28, 2017 yes, i am trying to take arma 2 objects and their coordinates as I am using a2 map with CUP. I do not want to do each object 1 by 1 manually. will take forever. So looking for a faster method to take my old a2 map and convert over to a3 Share this post Link to post Share on other sites
Harzach 2505 Posted March 28, 2017 setVehicleInit is not supported in Arma 3. 1 Share this post Link to post Share on other sites
tinboye 28 Posted March 28, 2017 ok how can I take this _this = createVehicle ["Land_R_Shed_Ind02", [11982.002, 12815.203, -0.12420972], [ ], 0, "CAN_COLLIDE"]; _this setDir 200.3562; and translate for eden collect3DENHistory{ { private[ "_obj" ]; _x params[ "_type", "_pos", "_rot" ]; _obj = create3DENEntity [ "Object", _type, _pos, true ]; _obj set3DENAttribute [ "rotation",[ 0,0,_rot ] ]; }forEach [ ["Land_R_Shed_Ind02",[11982.002, 12815.203, -0.12420972],200.3562,0,0,false] ]; }; works fine, but when I have a file with a bunch of the _this = createVehicle ["Land_R_Shed_Ind02", [11982.002, 12815.203, -0.12420972], [ ], 0, "CAN_COLLIDE"]; _this setDir 200.3562; Am i going to have to change each 1 to that format, or can a script do this for me. Share this post Link to post Share on other sites
Larrow 2794 Posted March 28, 2017 2 hours ago, tinboye said: I tried running that in the debug console, and it does not create the object on the map. Barring any unsupported commands or scripting errors it should create the objects when run from the debugConsole in Eden. All the mission scripts are available within Eden they are just not run. You should be able to run all your object creation scripts from the debugConsole which will create the objects as non Eden enitites. Then compare the difference between allmissionObjects "allVehciles" & "static" ( static for buildings ) and all3DENEntities select 0, iterate each one, get its pos and direction, delete it and recreate it as an Eden Object. createShed.sqf - saved in mission directory _this = createVehicle ["Land_R_Shed_Ind02", [11982.002, 12815.203, -0.12420972], [ ], 0, "CAN_COLLIDE"]; _this setDir 200.3562; From Eden debugConsole _nul = [] spawn { _thread = execVM "createShed.sqf"; waitUntil{ scriptDone _thread }; _newObjects = ( allMissionObjects "allvehicles" + allMissionObjects "static" ) - (all3DENEntities select 0); { _pos = getPosATL _x; _dir = getDir _x; _object = typeOf _x; deleteVehicle _x; _newObj = create3DENEntity [ "Object", _object, _pos, true ]; _newObj set3DENAttribute [ "position", _pos ]; _newObj set3DENAttribute [ "rotation", [ 0, 0, _dir ] ]; }forEach _newObjects; }; Will need testing to see how reliable the position info is when converted and will need fine tuning for what attributes you want to save but should be possible to to do. 1 2 Share this post Link to post Share on other sites
Rellikplug 11 Posted November 26, 2018 @Larrow Thank you! Share this post Link to post Share on other sites
M. Monkey 0 Posted November 29, 2019 On 3/29/2017 at 12:15 AM, Larrow said: _newObj set3DENAttribute [ "rotation", [ 0, 0, _dir ] ]; Whenever I use this it messes up the rotation of some of my objects. For example I have piers that are inverted to make ceilings however these appear lower than they are supposed to and they are no longer upside down. Other than that it works wonders, thanks a lot. Share this post Link to post Share on other sites
killzone_kid 1326 Posted November 29, 2019 If you turned them upside down you should probably include this in rotation Share this post Link to post Share on other sites
M. Monkey 0 Posted November 29, 2019 6 hours ago, killzone_kid said: If you turned them upside down you should probably include this in rotation I have tried but with no real success, I found that the 3den attribute rotation was set with pitch, roll, and yaw. So I used the BIS_fnc_getPitchBank to try and set the other two values for rotation however I must be doing something wrong as it only makes the rotation problem worse. _nul = [] spawn { _thread = execVM "mission.sqf"; waitUntil{ scriptDone _thread }; _newObjects = ( allMissionObjects "allvehicles" + allMissionObjects "all" ) - (all3DENEntities select 0); { _pos = getPosATL _x; _dir = getDir _x; _up = _x call BIS_fnc_getPitchBank; _object = typeOf _x; deleteVehicle _x; _newObj = create3DENEntity [ "Object", _object, _pos, true ]; _newObj set3DENAttribute [ "position", _pos ]; _newObj set3DENAttribute [ "rotation", [ _up, _dir ] ]; }forEach _newObjects; }; Share this post Link to post Share on other sites
killzone_kid 1326 Posted November 29, 2019 BIS_fnc_getPitchBank returns array you want angle. Anyway just tried it in eden and everything works fine. object totated first on z then on y then on x Share this post Link to post Share on other sites