Jump to content
Sign in to follow this  
McArcher

Size and Coordinates

Recommended Posts

I want to make a script, which will randomly place one thing on the map,but I don't know such things as:

* What size is the map of Chernarus (Xmax, Ymax in games dimensions)

* Where do coordinates start from (where is [0,0,0] located?)

* What is the function to return a random int/float in Arma2 scripts?

Thanks.

Share this post


Link to post
Share on other sites

* Where do coordinates start from (where is [0,0,0] located?)

In the editor, click to show textures. In the bottom left corner on the map you can see a change of brightness of colors, land gets a bit brighter green, water gets a bit brighter blue. The corner of this color changing is [0,0,0]. Hope I described it well enough :p

* What is the function to return a random int/float in Arma2 scripts?

It's random. Maybe u will also be interested in round.

Share this post


Link to post
Share on other sites

I would like to continue in this old thread, is there a way to get the upper limits, the max, in a script. Of course I can add support for several islands and try myself with "hint format ["%1", getpos player] but if i want to get that info.

Second, what happens when you fly outside "0,0" ? will you get minus?!

Share this post


Link to post
Share on other sites
I would like to continue in this old thread, is there a way to get the upper limits, the max, in a script. Of course I can add support for several islands and try myself with "hint format ["%1", getpos player] but if i want to get that info.

Second, what happens when you fly outside "0,0" ? will you get minus?!

0,0 is always bottom left corner of the map - (the numbers on the side of the map are a clue)

and yes you go beyond 0,0 it become minus.

Share this post


Link to post
Share on other sites

This should work from a units initline:

nul = [] spawn {
while {true} do {
	hintsilent format ["%1\n%2\n%3", getpos player select 0, getpos player select 1, getpos player select 2];
	sleep 0.1;
};
};

This will display the your coordinates nearly in realtime, also when moving. It doesn't matter if you're in a vehicle or not.

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  

×