Jump to content

Please help: Spawning a *linked* Static Object


Recommended Posts

Posted

So far in my mission scripts, I'm spawning static objects with no problems using 

coalition.addStaticObject(...)

 

and a table just as documented.

 

Now I'm trying to spawn a static object on the deck of a Tawara helicopter carrier, and spawning static objects does not have the result I had hoped for. "Of course!", I thought, "that's because they need to be anchored to the object - to the Tawara." So I built a reference mission in ME, and studied the result. Sure enough, the info is there: an "offsets" table in unit[1], and a funky linkOffset bool. So I naïvely tried putting it together by simply supplying all that data (including a rudimentary route with one point) to addStaticObject, but no dice. The object will not appear.

 

So does anyone have an idea how I can accomplish this? How does that data table look when creating a linked static object? Is there perhaps a 'link static to unit' method that I'm unaware of? Methinks I'm overlooking something obvious, since adding static objects to a unit is such a basic task that even ME supports it. 

 

Any help appreciated,

-ch

 

Posted

In for the interest. I know for sure you could (at least 2.5.6) spawn static objects on stationary ships, but not moving ones.

 

I did this with cargos.

 

Also pointing out - not everything that the ME offers has an accompanying facility in the scripting engine. 

 

Banner EDForum2020.jpg

Have fun. Don't suck. Kill bad guys. 👍

https://discord.gg/blacksharkden/

  • Recently Browsing   0 members

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