Hellbat Posted April 8, 2021 Posted April 8, 2021 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?
InfinityWingman Posted April 8, 2021 Posted April 8, 2021 Not ideal, but you could define polygon zones in the editor around trees in the ME. https://flightcontrol-master.github.io/MOOSE_DOCS/Documentation/Functional.Detection.html ASUS Z390 / Intel i7-9700K / 32 GB DDR4 / 1080Ti / HP Reverb 2 / Thrustmaster WH&TPR Heath and Allen Zedi8 / TrackIR / Momo USB monitor / Akai MPD218
Hellbat Posted April 9, 2021 Author Posted April 9, 2021 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.
toutenglisse Posted April 9, 2021 Posted April 9, 2021 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.
Recommended Posts