IZHRAH Posted March 1, 2013 Share Posted March 1, 2013 If I'm going get the parcel size using PARCEL_DETAILS_AREA is there a way I can get the dimension of it (N x N).Example: if I got 65536 Square Meter. How can I automate it in a script to figure out the (N x N)? The result I must get is 256 x 256 right? Link to comment Share on other sites More sharing options...
Dora Gustafson Posted March 1, 2013 Share Posted March 1, 2013 In this case and in all cases when the land/parcel is square the side equals the square root llSqrt In general you have to make presumptions about the the parcel shape like you do when it is square We do not have any LSL functions dealing with the length of parcel sides :smileysurprised::smileyvery-happy: Link to comment Share on other sites More sharing options...
Miranda Umino Posted March 1, 2013 Share Posted March 1, 2013 loop using PARCEL_DETAILS_ID by 4 meters steps ( a parcel dimension is always mutiple of 4 meters ) If the PARCEL_DETAILS_ID change , you will detect the borders of your land . Some parcels are merged and can be neither squared , neither rectangular . They can be U-shape , L-Shape , S-shape , O-shape etc ... They can have some holes too . 1 Link to comment Share on other sites More sharing options...
LepreKhaun Posted March 2, 2013 Share Posted March 2, 2013 Miranda Umino wrote: loop using PARCEL_DETAILS_ID by 4 meters steps ( a parcel dimension is always mutiple of 4 meters ) If the PARCEL_DETAILS_ID change , you will detect the borders of your land . Some parcels are merged and can be neither squared , neither rectangular . They can be U-shape , L-Shape , S-shape , O-shape etc ... They can have some holes too . It's even more complicated than that- a parcel can be discontinuous, consisting of separated areas in different locations within a region. One way of forming such, by joining across a Linden RoW, is detailed here: http://community.secondlife.com/t5/General-Discussion/Make-two-parcels-to-one/td-p/1882731 . The other, by separation, can be done by isolating two or more areas of a parcel with intervening parcels. [edited to show examples] Link to comment Share on other sites More sharing options...
IZHRAH Posted March 6, 2013 Author Share Posted March 6, 2013 Miranda how you will do that using PARCEL_DETAILS_ID can you give me a sample to it? Link to comment Share on other sites More sharing options...
IZHRAH Posted March 6, 2013 Author Share Posted March 6, 2013 Sorry I mean using this llGetParcelDetails(<4, 4, 0>, [PARCEL_DETAILS_ID])); will get only the 4x4 range right? then 1 step a head is <8, 4, 0>? It makes sense now. Link to comment Share on other sites More sharing options...
Kenn Nilsson Posted March 6, 2013 Share Posted March 6, 2013 The best way to check each 4 x 4 land square is to start at position <2, 2, 0> as that would place your prim in the center of the square that exists from 0 - 4 x and 0 - 4 y. You would then iterate by 4 as you had mentioned ... so <6, 2, 0>, <10, 2, 0>, etc. Something along the lines of ... list ldetailsvector vpos = <2, 2, 0>;vector vend = <254, 254, 0>;while (llGetPos() != vend) { while (llGetPos() != vpos) { llSetPos(vpos); } ldetails = llGetParcelDetails(vpos, [PARCEL_DETAILS_ID])); //do something with the id to store it/etc. if (vpos.x < 254) { vpos = <vpos.x + 4, vpos.y, vpos.z>; } else { vpos = <2, vpos.y + 4, vpos.z>; }} *CAUTION: The code above was written spur of the moment right now as an example of how to work the process, it has not been tested in SL and there may very well be either a) issues or b) a better way to do it. Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now