Jump to content
Sign in to follow this  
dr_eyeball

fn_PosToGrid.sqf - module functions

Recommended Posts

The posToGrid script function only works for Chernarus.

The correct "offset" to apply for Utes is 5120. (Chernarus uses 15360.)

To add support for Utes (and future terrain addons), you can change the code to something like:

[color=Navy]private ['_yOffset'];

_yOffset = switch toLower(worldName) do
{
 case 'chernarus': {15360};
 case 'utes': {5120};
 default {15360};
};[/color]
_xgrid = floor (_x / 100);
_ygrid = floor (([color=Navy][b]_yOffset[/b][/color] - _y) / 100);

Ref File: ".\ArmA 2\AddOns\modules\Functions\misc\fn_PosToGrid.sqf"

Let us know if you find a fast automatic method.

Share this post


Link to post
Share on other sites

Could you post an example how you used that function? I just spent 2 hours trying to figure that out but the only return i get is "ANY" and the .rpt isn't very helpful either.

Share this post


Link to post
Share on other sites

The world-to-grid function in SPON Map is still universal (Absolutely any A1 or A2 map!), but it will be a while until I get it ported to A2.

Share this post


Link to post
Share on other sites

big thumbs up @ bis for keeping this hoop for us to jump over

Share this post


Link to post
Share on other sites

Oh no..... This nightmare again... Why can't they just give us a builtin command? AI reports proper grids all the time.

I'm using the SPON_Map for this. But getting simple grid readouts adds quite a lot of additional data to the mission compared to the gain.

But anyway, hopefully all islands will follow the new system at least, no more letters.

What is needed if someone wants the correct northing? Currently the northing is inverse.

Share this post


Link to post
Share on other sites

Well, yes, having SPON Map just for this one function is overkill. But then how can anyone play without it? :P

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×