[LIB] Get Object Size

The place to discuss scripting and game modifications for X³: Reunion.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

[LIB] Get Object Size

Post by Gazz » Sat, 23. Aug 08, 14:12

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)
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.

Post Reply

Return to “X³: Reunion - Scripts and Modding”