Jump to content

Recommended Posts

Posted

They're fixed on the ground/water/buildings of course, so they're not going to move. But they haven't been activated yet - but I'd still like to know what their 'point' will be.

Is this possible?

Posted

There is no way for static objects to be "activated" outside of it not existing and then spawning it via script. As always if it is placed in the editor you can find where-ever an object starts at by searching for it in env.mission. Since it doesn't move there is no need for Object.getPoint()

That said for groups that are set to late activation the group and unit objects are accessible before they get activated. There is a caveat where this is not the case with client groups/units or if you change the spawn probability. For both it is kind of the same principle where the objects simply don't exist. The difference being clients can spawn whenever they want. 

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Posted

I agree that an easy way to collect all mission-placed statics is to go through the mission itself.

6 hours ago, Grimes said:

Since it doesn't move

Unless it‘s cargo or linked to a unit (usually a ship)

 

Posted
2 hours ago, Elphaba said:

Ah yes, I forgot to mention, the statics are linked to objects that are late activated. 
 

so, they should still have their positions somewhere in env.mission right?

That I don't actually know. I honestly have never tested what statics do when placed on late activated ships. 

Yes their position as saved in the editor will be there either as the X, Y coords or as an offset table. 

  • Thanks 1

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Posted
2 hours ago, Grimes said:

That I don't actually know. I honestly have never tested what statics do when placed on late activated ships. 

Yes their position as saved in the editor will be there either as the X, Y coords or as an offset table. 

Wow, I stumped you. Do I get a prize? 😉

 

Thanks again @Grimes

Posted (edited)
7 hours ago, Elphaba said:

so, they should still have their positions somewhere in env.mission right?

They do, and on spawn, their coordinates match the miz (since the ship that they are linked to hasn‘t moved yet). The offset table is weird, and can only be used if you also know the ship‘s initial heading and current heading, so I‘d try to rely on getPoint() for the static. Also worth remembering is that the objects turn with the unit that they are linked to (i.e., static objects can change their heading).

Edited by cfrag
  • Thanks 1
Posted
3 hours ago, cfrag said:

They do, and on spawn, their coordinates match the miz (since the ship that they are linked to hasn‘t moved yet). The offset table is weird, and can only be used if you also know the ship‘s initial heading and current heading, so I‘d try to rely on getPoint() for the static. Also worth remembering is that the objects turn with the unit that they are linked to (i.e., static objects can change their heading).

 

Perfect! Thank you @cfrag! GetPoint() was exactly what I wanted. 🙂

  • Recently Browsing   0 members

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