Jump to content

Recommended Posts

Posted

Hi,

 

In changelog, :

 

"Added scripting functions for airbase parking data (true/false parameter)."

 

Can I have more explanations?

 

Thanks in advance.

Sunski

Posted (edited)
+1, sounds very interesting thumbup.gif

 

 

The function is still in works, but so far this has been implemented:

 

Airbase.getParking(true/false)

true - gets only available parking.

false - gets all parkings

 

Returns:

 

[1] =

{

Term_Index = (int)

Term_Index_0 = (int)

Term_Type = (int)

TO_AC = (bool)

fDistToRW = (float)

vTerminalPos = (vec3)

}

nt Term_Index; // Terminal index

int Term_Index_0; // Index of initial point of the taxi path

int Term_Type; // Terminal type

bool TO_AC; // true - taking off aircraft, false - landing aircraft

float fDistToRW; // Distance to RW (all distancies measured to the 1st RW edge)

 

 

enum wsTermTypes

{

wsttUnknown = 0,

wsttTurnpoint = 1 << 1,

wsttShelter = 1 << 2,

wsttOpenParking = 1

wsttRunWayPoint = 1 << 4,

wsttHelicopter = 1 << 5,

wsttAirplane = 1 << 6

};

 

 

(Term_Type & wsttOpenParking) || (Term_Type & wsttShelter) <==== is parking

Edited by sea2sky

i5-9600K@4.8GHz 32Gb DDR4 rtx5070ti Quest Pro Warthog on Virpil base

Posted

Fully documented it here: https://wiki.hoggitworld.com/view/DCS_func_getParking

 

Wasn't prepared for it to go live just yet, so I had to double check the status of it before I documented it.

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Posted
Fully documented it here: https://wiki.hoggitworld.com/view/DCS_func_getParking

 

Wasn't prepared for it to go live just yet, so I had to double check the status of it before I documented it.

 

 

Great! Now I'm wondering how to get a reference to the Airbase object without knowing its name. Say for example, I have a unit with an airdromeId - any way to figure what airbase it belongs to?

i5-9600K@4.8GHz 32Gb DDR4 rtx5070ti Quest Pro Warthog on Virpil base

Posted

Cross reference with world.getAirbases()

 

 

Push comes to shove you can make a lookup table fairly quickly. The bases on the map are fixed. Only FARPs and ships wouldn't show up on that list. https://wiki.hoggitworld.com/view/Category:Terrain_Information

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

  • 1 month later...
Posted

Just to make sure, are we supposed to use 'parking' or 'parking_id' for the retrieved Term_Index?

-

If man were meant to fly he'd be filled with helium.

  • Recently Browsing   0 members

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