Jump to content

Variable Behavior of coalition.addStaticObject()


Recommended Posts

Posted

These 2 statics were generated (by the same code) using coalition.addStaticObject(). As you can see, both objects are created, and both are visible on the F10 map.  For some reason, however, the smoke has its altitude set to absolute 0. The net effect of this is that the smoke is not visible in the sim (presumably it is under the level of the land).

Why does the airshow cone have it's altitude set correctly (and thus is visible in the sim), but the smoke does not?  For laughs (or tears), I've tried adding a "z" field, an "alt" field and an "altitude" field, each set with the elevation of the ground at the coords of the object, with no change in behavior.  The big smoke object (and perhaps others) behave differently than "normal" statics.  Does anyone know why?

Untitled-1.png

Untitled-2.png

Posted (edited)

Heyo did some checking myself and seems to be related to the "category" field
if this is incorrect or nil it will put it at 0 ASL

your "Effects" is invalid -> "Effect"

Still presume this is a bug and should not behave like this.....

For extra joy you can use the attached file listing all Unit typenames and as the "key" there respective "category" for double checking 🙂

Typenames from DCS : "2.9.19.13478"

Hope this helps

TGFB_Unit_typenames_by_category.lua

Edited by Tobias00723
Posted

Thanks for the responses, I appreciate it!

I certainly hope this is a bug, the "Effects" string is coming out of the mission lua and I don't have another source for that value.  What I mean is, I'm not running the method with values I'm providing, they are coming from an external source.

I know there are differences between how the mission stores statics and what the addStaticObject method takes, but if you're correct, I'd be in a pretty bad place.

Thanks again and let me know if you discover anything else, I'll do the same!

  • Recently Browsing   0 members

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