Jump to content

Locating Trees/Forest in Scripts


Recommended Posts

I've been developing a script to dynamically generate groups of ground forces and spawn them in random zones.  I've run into the issue that some forces are being placed in the middle of a forest.  While this is OK for infantry units, it isn't really desirable for larger vehicles, radar systems, SAMs etc.  I'm still quite new to script development with DCS, but I'm struggling to determine whether an area is designated as forest or there are trees at a specific coordinate.  I'm primarily using MOOSE and the only function I've found which sounded useful was COORDINATE:ScanObjects() which can return a SCENERY object table, but none of the objects I have found so far appear to be trees.  Has anyone succeeded in determining the location of trees/forest or is this not currently possible?

Link to post
Share on other sites

Yeah, I've actually used polygon zones to define some of my zones for group activation and they're pretty useful.  It would be possible, but unfortunately it isn't really scalable; for my current project I'd have to manually define hundreds of zones, which I'm trying to avoid.

Link to post
Share on other sites
15 hours ago, Hellbat said:

...Has anyone succeeded in determining the location of trees/forest or is this not currently possible?

 

It's a big hope that I think anyone using scripts for dynamic scenarios has.
Functions to handle scenary objects are working very well like you said for being away of or really close to urban areas but not merged with objects, and the same is needed to interact with trees/forests.
I'm pretty sure it can be done, if not with tree objects maybe with surface type (need access to substract texture types for example or other thing that defines a wooded area). But we are still waiting.

Link to post
Share on other sites
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...