Jump to content

Recommended Posts

Posted

Is there a way, using lua code, to get the length of the runway(s) of a particular airbase?

 

In other words, can some one translate this pseudo-code into real code? Thanks!

 

airbase = Airbase.getByName("SomeAirfield")

length = airbase:getRunwayLength()

[sIGPIC][/sIGPIC]

 

Intel Core I7 4820K @4.3 GHz, Asus P9X79 motherboard, 16 GB RAM @ 933 MHz, NVidia GTX 1070 with 8 GB VRAM, Windows 10 Pro

Posted
Is there a way, using lua code, to get the length of the runway(s) of a particular airbase?

Not really. You can use the getParking function to get the runway spawn points. The distance between these points is a good approximation (lower bound) of the runway length. The Moose ATIS class uses this, for example.

A warrior's mission is to foster the success of others.

i9-12900K | RTX 4090 | 128 GB Ram 3200 MHz DDR-4 | Quest 3

RAT - On the Range - Rescue Helo - Recovery Tanker - Warehouse - Airboss

Posted

Thanks, that's a smart way of doing it. For now, however, what I'll prolly do is measure the runway length by hand in the ME, and collect them in a lua table. That obviously has the disadvantage that this table must be updated by hand when they make changes to the maps....

[sIGPIC][/sIGPIC]

 

Intel Core I7 4820K @4.3 GHz, Asus P9X79 motherboard, 16 GB RAM @ 933 MHz, NVidia GTX 1070 with 8 GB VRAM, Windows 10 Pro

Posted

I'd check the airbase object description (or the database), perhaps the length of the runway(s) is listed there.

 

Like pmiceli said, if runway length is displayed in the F10 map, it means it's stored somewhere... just need to figure out where and whether it's accessible via scripting.

  • Recently Browsing   0 members

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