Page 1 of 1

[LIB] Get Object Size

Posted: Sat, 23. Aug 08, 14:12
by Gazz
Returns the object size of
  • any in sector object
    (okay, so that part was easy =)
  • any OOS ship or station
  • any ship or station waretype code (the "wares" in a shipyard)
    Yes, that means it's not even required to have an actually existing ship to get it's size.
There is only 1 argument. Just put any object or ship/station type in.

Returns null if the argument did not fit any of the above categories.

Note that object size in X3 is given as radius = half the objects max dimension.
Makes it easy to find the minimum distance between 2 objects by simply adding their sizes.

Extremely fast and resource-friendly handling of repeated requests.
Does not require any kind of setup or preparation phase.

[ external image ] (ZIP)