Home   Help Search Login Register  

Author Topic: finding a position on the map  (Read 1871 times)

0 Members and 2 Guests are viewing this topic.

sinchi runa

  • Guest
finding a position on the map
« on: 10 Feb 2008, 21:05:43 »
greetings

in the game domination, the script creates the triggers and markers by:

from the Init.sqf
Code: [Select]
...
 target_names = [[[9236.66,7105.54,0],"At Tuwayr", 250],
[[9665.55,9041.75,0],"Masjid Al Rahmania", 235],
[[8948.64,8645.48,0],"Hotel Mared", 200],
[[10619.41,5349.50,0],"Al Qara", 230],
[[10053.22,10251.15,0],"Ibn Al Khattab", 300],
[[9221.09,10777.45,0],"Qasr Marid",280],
[[8340.97,12330.08,0],"Al Bayda",300],
[[7336.94,11204.95,0],"Factory",300],
[[9233.20,8783.83,0],"TV Station",240],
....

question: how does one find these types of coordinates?


Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: finding a position on the map
« Reply #1 on: 10 Feb 2008, 21:41:00 »
you may try this or this

sinchi runa

  • Guest
Re: finding a position on the map
« Reply #2 on: 10 Feb 2008, 21:49:28 »
i have tried both of these a couple of days ago when i first thought about this question.

though they return a simple coordinate ( Aa00  ), it is not the 9665.55,9041.75...

does this matter? or will a simple Aa00 work the same for placing the triggers on a map?

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: finding a position on the map
« Reply #3 on: 10 Feb 2008, 22:00:46 »
Now I understand the question, the grid coordiantes is what you get with these functions, the map coordinates are already in your arrays.

If your question us how to get the coordinates from the arrays to create a trigger:
Code: [Select]
{
   _coords = _x select 0;
} forEach target_names;

or
Code: [Select]
_numtarget = 3; // for example
_coords = (target_names select _numtarget) select 0;

sinchi runa

  • Guest
Re: finding a position on the map
« Reply #4 on: 10 Feb 2008, 22:13:59 »
where do i put the code that you wrote?

Quote
If your question us how to get the coordinates from the arrays to create a trigger:

i think so? (after 6 months of reading and trail and error... still a noob)..
it's how do i find the map coordinates on a map, so i can edit the script for a different island.

example: the fragment init.sqf i posted is from Sakakah Al Jawf domination. i would like to put domination on
the new Sarve Island.  so i need to open the Sarve map and find the map coordinates so i can switch the targets.

http://www.armaholic.com/page.php?id=2749

will the script by Cheetah work with that code inserted somewhere?

thank you
« Last Edit: 10 Feb 2008, 22:16:14 by sinchi runa »

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: finding a position on the map
« Reply #5 on: 10 Feb 2008, 22:50:04 »
aha, you have a different island and you want to get map coordiantes, no I get the problem.
Do the following, place a marker named mk_getpositon there where you want to get the coordinates. Place a player anywhere in the map, in the init field of the player put:
Code: [Select]
hint forma["%1", getMarkerPos "mk_getPosition"]
this way you'll have a hint with the map coords of there where you place the mk_getposition marker.

sinchi runa

  • Guest
Re: finding a position on the map
« Reply #6 on: 10 Feb 2008, 23:18:16 »
 :D

had to fix 2 grammar errors and put the hint on a radio trigger.

works great! :good:

thanks again

for future readers-

to find the map cooridnates:

Quote
create a marker called: mk_getposition

create a radio trigger and in the init line put:

hint format["%1", getMarkerPos "mk_getPosition"]


*SOLVED
« Last Edit: 10 Feb 2008, 23:24:39 by sinchi runa »