egbert 29 Posted April 28, 2016 Hi there ! I was just wondering : when using the wonderful "log position to clipboard" function in 3den Editor (by right clicking an object), is there a way to get a more accurate position ? Like 3 numbers after the comma ? For now it seems it only copy one number after comma, rouding up or down the position, for example, I place a wall, the position in the attributes are : X = 25343.924 ; Y = 23150.49 ; Z = 0.012 And after logging the position in the clipboard, and pasting it in a text editor, it gives me : [25343.9 ,23150.5 , 0.0122185] . The Z axis is very very accurate, almost a bit too accurate. The two other aren't. Does anyone here know how to get more accurate value ? Maybe a short code to include in the debug console ? Thanks in advance ! Share this post Link to post Share on other sites
egbert 29 Posted May 2, 2016 Up ! I would be surprised nobody here haven't even a clue to solve this problem ! I've seen so many tricky problems find their resolution in this forum ! :) Or maybe this topic should go to the troubleshooting section ? Thanks in advance ! Share this post Link to post Share on other sites
Greenfist 1863 Posted May 2, 2016 This might be helpful: http://killzonekid.com/arma-scripting-tutorials-float-to-string-position-to-string/ Share this post Link to post Share on other sites
egbert 29 Posted May 2, 2016 Thanks a lot for your answer Greenfist ! The KK's blog post is indeed very interesting. I can't say I understood it all, first of all because english is not my mother tongue and because I'm a newbie at scripting. But I got the essential. Now I don't know what to do with these pieces of scripting, can I use it as a function in Eden Editor ? If yes, I don't have any clue how to do that... I'm sorry, I thought it might be easier to achieve that. But thanks anyway Greenfist, it's a good start ! Share this post Link to post Share on other sites
Greenfist 1863 Posted May 2, 2016 If you just simply want to copy the position to clipboard, you could select one object in editor and paste & execute this adaptation of KK's script in the console: copyToClipboard ((getpos (get3DENSelected "" select 0 select 0)) call { private "_fnc"; _fnc = { if (_this < 0) then { str ceil _this + (str (_this - ceil _this) select [2]) } else { str floor _this + (str (_this - floor _this) select [1]) }; }; format ["[%1,%2,%3]",_this select 0 call _fnc, _this select 1 call _fnc, _this select 2 call _fnc] }) But the question is, what do you need this for? There might be a simpler way to handle whatever you're trying to achieve. 1 Share this post Link to post Share on other sites
egbert 29 Posted May 4, 2016 Thanks Greenfist it works like a charm ! I needed it to copy a whole composition (an armurery template) I made with Eden to a .sqf file, in order to light my missions and gain some FPS when starting it. The thing is I placed some objects which require more accuracy in their position than rounded position you got when you hit the "log position to clipboard" in Eden. I also started to use the great LX OPS which can also copy objects placed in Eden faster and with a lot of precision (and it also manage pitchbank). Lx OPS gives you a code like this : _pos = [14567.373047,16763.480469,0.860943];_object = createVehicle ["Intel_File2_F", _pos, [], 0, "CAN_COLLIDE"];_object setDir 224.927;_object setPosATL _pos;[_object, 67.1907, 0.0353917] call BIS_fnc_setPitchBank;_object enableSimulation false; And I copy this code in my .sqf file which is called at the beginning of my mission in the init.sqf . But if you know a way to copy multiple object with their exact position and which manage pitchbank, avoiding me to copy object by object, I'm all ears, it would spare me a loooot of time ! Anyway, thank you for your handful contribution, it's really nice of you ! Share this post Link to post Share on other sites