DracheTek -> Transferring CMO map to TOAW map (7/13/2020 7:50:41 AM)
|
I wrote up a piece of code like following:
startN = 26
startE = 119.3
N = startN
E = startE
incN = *something that looked like phone number to the forum system*
incE = *something that looked like phone number to the forum system*
for e = 1,200 do
for n = 1,150 do
terrain = World_GetLocation({latitude = N, longitude = E})
if terrain.cover ~= nil then
print(e..":"..n.." :"..terrain.cover.text)
else if terrain.altitude ~= nil then
if terrain.cz~=nil then
print(e..":"..n.." :Deep Water")
else print (e..":"..n.." :Shallow Water")
end
else print (e..":"..n.." :ERROR")
end
end
--ScenEdit_AddReferencePoint({side = 'BLUE', name = n..":"..e, lat = N, lon = E, highlighted = true})
N=N+incN
--break
end
N = startN
E = E+incE
--break
end
Obviously it can grab the location info of a CMO map and return ground type or "water" in the form of string, but I currently cannot figure out how to transfer this into TOAW ground type. the structure of mml file of TOAW is pretty straightforward, but it lacks of documentation and I am pretty stuck. If here is anyone who is familiar with TOAW XML, please help. Thank you very much in advance.
|
|
|
|