Thanks guys! It's strange, even though I map the Y coordinate to Z, it still seems very "off" from my lat/long coordinates.
Strange, the info bar comes up, but it doesn't change coordinate systems when I toggle it again. On the third toggle it disappears again so there's obviously some toggle inbetween... But all I see is lat/long coordinates.
Okay so I tried to figure what lat/long coordinates that are correct to get the group to spawn where I want. This is the code:
-- Initialization
if (initialized == nil) then
initialized = true
end
function test()
local coordinate3 = coord.LLtoLO(42.24, 42.66)
local coordinate2 = {
x = coordinate3.x,
y = coordinate3.z
}
local lat, long, alt = coord.LOtoLL(coordinate3)
local msg = coordinate2.x .. "," .. coordinate2.y
trigger.action.outText(msg, 1)
local groupData = {
["visible"] = false,
["taskSelected"] = true,
["route"] =
{
}, -- end of ["route"]
["groupId"] = 2,
["tasks"] =
{
}, -- end of ["tasks"]
["hidden"] = false,
["units"] =
{
[1] =
{
["type"] = "LAV-25",
["transportable"] =
{
["randomTransportable"] = false,
}, -- end of ["transportable"]
["x"] = coordinate2.x,
["y"] = coordinate2.y,
["unitId"] = 2,
["skill"] = "Excellent",
["name"] = "Ground Unit1",
["playerCanDrive"] = true,
["heading"] = 0.28605144170571,
}, -- end of [1]
}, -- end of ["units"]
["name"] = "Ground Group",
["start_time"] = 0,
["task"] = "Ground Nothing",
} -- end of [1]
coalition.addGroup(country.id.USA, Group.Category.GROUND, groupData)
end
test();
So now it's spawning in the correct location, but why can't I use the lat/long coordinates that I read from the F10 map?
See where it spawned:
EDIT: and yes, my mouse pointer is positioned directly above the unit