Modding Help How is a 'Rect' defined?

Discussion in 'Starbound Modding' started by nickc01, Feb 12, 2017.

Tags:
  1. nickc01

    nickc01 Phantasmal Quasar

    I'm trying to figure out how I would be able to create a 'rect' that can be used in a function, like this one :

    Code:
    world.loadRegion(`RectF` region)
    How exactly is a rectF defined in this example?
     
  2. bk3k

    bk3k Oxygen Tank

    I'm not on my computer, so forgive if my memory is mistaken here.

    Lower left/South West corner and upper right/ north east corner, but not in the format you would expect. It isn't a 2-element list with 2 nested 2-element(x, y) lists within. It is more like
    {ll.x, ll.y, ur.x, ur.y}

    The .x and .y was for explanation of the order, not actual code.

    Once I am at home, I have functions to translate coordinates to 'rect' and back, although you probably can build your own easily enough. Let me know if you want them.
     
    Last edited: Feb 12, 2017
    nickc01 likes this.
  3. nickc01

    nickc01 Phantasmal Quasar

    I got it to work, thanks :)
     

Share This Page