DCS func profile

From DCS World Wiki - Hoggitworld.com

Scripting Root

Envrioment: Mission Scripting
Function: profile Added with: 1.2.0
Member Of: land
Syntax: table of vec3 land.profile(table vec3, table vec3 )
Description: Returns a table of vectors that make up the profile of the land between the two passed points.

The spacing and quantity of returned vectors is not entirely known to the author. Requires further testing.


Return Value: table of vec3
Return Example: A table snippet of returned values.
{
   [1] = 
   {
       ["y"] = 74.462371826172,
       ["x"] = -265966,
       ["z"] = 643432.25,
   }, -- end of [1]
   [2] = 
   {
       ["y"] = 74.612861633301,
       ["x"] = -266027.09375,
       ["z"] = 643463.5,
   }, -- end of [2]
   [3] = 
   {
       ["y"] = 74.613082885742,
       ["x"] = -266040.90625,
       ["z"] = 643470.5,
   }, -- end of [3]
   [4] = 
   {
       ["y"] = 74.538024902344,
       ["x"] = -266121.90625,
       ["z"] = 643511.875,
   }, -- end of [4]
}
Examples: The following would draw a smoke marker at each point between two trigger zones named "profile1" and "profile2".
local pro = land.profile((trigger.misc.getZone('profile1').point), (trigger.misc.getZone('profile2').point))
for i, data in pairs(pro) do
 trigger.action.smoke(data, 2)
end
Related Functions: land functions: getHeight, getSurfaceType, isVisible, getIP, profile, getClosestPointOnRoads, findPathOnRoads
Notes: