Remoz

How to edit a list of coordinates?

8 posts in this topic

Hello,
to edit an existing list of coords like "[12275,14275],[12375,14275],[12575,14275],[12675,14275]" in the map editor, to see actual points and add new or remove existing by their place on the map, how i can do this?

I know the Export menu in EDEN (M3Editor section) but how i can import?

Many many thanks,

bye

Remoz

Share this post


Link to post
Share on other sites

i would just place a unit or object in the map, right click, go to attributes,

enter coordinates in x y z

then copy the new coordiates from there

 

Share this post


Link to post
Share on other sites
Advertisement
1 hour ago, tinboye said:

i would just place a unit or object in the map, right click, go to attributes,

enter coordinates in x y z

then copy the new coordiates from there

 

Yes, but i have 204 points to place on the map, there is no automatic process like "import"? I thought to edit this list adding a object (not important which) on every coordinate pair but i don't know after how i can import the list in editor.

Many thanks

Share this post


Link to post
Share on other sites

I am sure there is a script you can run within debug console. When I add objects into my missions I use:

Spoiler

   collect3DENHistory{
    {
        private[ "_obj" ];
        _x params[ "_type", "_pos", "_rot" ];

        _obj = create3DENEntity [ "Object", _type, _pos, true ];
        _obj set3DENAttribute [ "rotation",[ 0,0,_rot ] ];

    }forEach [
   ["Exile_Sign_TraderCity",[x,y,z],0,0,0,false],
   ["Exile_Sign_TraderCity",[x,y,z],0,0,0,false],
   ["Exile_Sign_TraderCity",[x,y,z],0,0,0,false],
   ["Exile_Sign_TraderCity",[x,y,z],0,0,0,false]
];
};

 

could start with that, just putting each line with each set of coordinates. If your file is [12275,14275],[12375,14275],[12575,14275],[12675,14275]"  but no object specified. Then you could use a copy and replace to add an object to each using notepad++

ctrl + H
replace ],[

with

],0,0,0,false],\n["Exile_Sign_TraderCity",[

wg7CpjX.png

your left with

JL6bgyu.png

then the first and last line you just manually add the missing parts

D8OapJ.png

left with this

then add

   collect3DENHistory{
    {
        private[ "_obj" ];
        _x params[ "_type", "_pos", "_rot" ];

        _obj = create3DENEntity [ "Object", _type, _pos, true ];
        _obj set3DENAttribute [ "rotation",[ 0,0,_rot ] ];

    }forEach [

above, and

];
};

below. copy into your debug console, press local exec, then close debug console and the objects will appear on your map.

Now, note that if you only have 2D coordinates, not ATL this will not work, you would have to add to each elevation of 0

so it would appear as a final script like so

   collect3DENHistory{
    {
        private[ "_obj" ];
        _x params[ "_type", "_pos", "_rot" ];

        _obj = create3DENEntity [ "Object", _type, _pos, true ];
        _obj set3DENAttribute [ "rotation",[ 0,0,_rot ] ];

    }forEach [
["Exile_Sign_TraderCity",[12275,14275,0],0,0,0,false],
["Exile_Sign_TraderCity",[12375,14275,0],0,0,0,false],
["Exile_Sign_TraderCity",[12575,14275,0],0,0,0,false],
["Exile_Sign_TraderCity",[12675,14275,0],0,0,0,false]
			 ];
	};

 

Share this post


Link to post
Share on other sites
43 minutes ago, tinboye said:

I am sure there is a script you can run within debug console. When I add objects into my missions I use:

  Reveal hidden contents


   collect3DENHistory{
    {
        private[ "_obj" ];
        _x params[ "_type", "_pos", "_rot" ];

        _obj = create3DENEntity [ "Object", _type, _pos, true ];
        _obj set3DENAttribute [ "rotation",[ 0,0,_rot ] ];

    }forEach [
   ["Exile_Sign_TraderCity",[x,y,z],0,0,0,false],
   ["Exile_Sign_TraderCity",[x,y,z],0,0,0,false],
   ["Exile_Sign_TraderCity",[x,y,z],0,0,0,false],
   ["Exile_Sign_TraderCity",[x,y,z],0,0,0,false]
];
};

 

could start with that, just putting each line with each set of coordinates. If your file is [12275,14275],[12375,14275],[12575,14275],[12675,14275]"  but no object specified. Then you could use a copy and replace to add an object to each using notepad++

ctrl + H
replace ],[

with

],0,0,0,false],\n["Exile_Sign_TraderCity",[

wg7CpjX.png

your left with

JL6bgyu.png

then the first and last line you just manually add the missing parts

D8OapJ.png

left with this

then add


   collect3DENHistory{
    {
        private[ "_obj" ];
        _x params[ "_type", "_pos", "_rot" ];

        _obj = create3DENEntity [ "Object", _type, _pos, true ];
        _obj set3DENAttribute [ "rotation",[ 0,0,_rot ] ];

    }forEach [

above, and


];
};

below. copy into your debug console, press local exec, then close debug console and the objects will appear on your map.

Now, note that if you only have 2D coordinates, not ATL this will not work, you would have to add to each elevation of 0

so it would appear as a final script like so


   collect3DENHistory{
    {
        private[ "_obj" ];
        _x params[ "_type", "_pos", "_rot" ];

        _obj = create3DENEntity [ "Object", _type, _pos, true ];
        _obj set3DENAttribute [ "rotation",[ 0,0,_rot ] ];

    }forEach [
["Exile_Sign_TraderCity",[12275,14275,0],0,0,0,false],
["Exile_Sign_TraderCity",[12375,14275,0],0,0,0,false],
["Exile_Sign_TraderCity",[12575,14275,0],0,0,0,false],
["Exile_Sign_TraderCity",[12675,14275,0],0,0,0,false]
			 ];
	};

 

Great!! It's perfect!

Many many thanks tinboye! I'm pretty good with notepad++ so i don't think i will have problems ;-)

Bye,

Remoz

Share this post


Link to post
Share on other sites

There is only a little parts of 204 places! I've used a very very big object so i can easily see where they are placed! :-D

Many thanks tinboye!

c u

Remoz

Desktop 03.31.2017 - 00.06.12.02.jpg

Share this post


Link to post
Share on other sites

I was going to recommend exactly what TinBoye also said, maybe a tad different, but the same principal.  I have been using the 'search and replace' trick in programming  for decades and in ARMA for a good while too...it's lame...but it works beautifully!

:)

 

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.