Jump to content

LUA LogetObjectbyID


Recommended Posts

Guest SmokyVJS161
Posted

Hello,

 

I have a minor problem with LUA. I want tot get Lat and Long of the Target I have locked.

 

This code does not work and i don't know why?

 

------------------------------------------------------------------

local trg = LoGetLockedTargetInformation()

 

_tcoal = 0

_tID = 0

 

for i,cur in pairs(trg) do

_tcoal = cur.country

_tID = cur.ID

end

 

 

TgtPlane = LoGetObjectById(_tID)

_tLat = TgtPlane.LatLongAlt.Lat

---------------------------------------------------------

I get a value in _tID but then how do I use that ID to get the Lat of that particular Object?

 

Any help is welcome.

 

Thanks

 

Sebastian

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...