Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Alternative to LLRezObject

Fiona Haworth
Co-Owner of Prim Pads
Join date: 12 Dec 2007
Posts: 92
08-22-2008 09:13
I'm trying to get out of the hard limit of 10m. Anyone know of another way to rez an item further than 10m??
Mrc Homewood
Mentor of Randomness
Join date: 24 Feb 2007
Posts: 779
08-22-2008 09:18
only way i can think of is have it llRezObject then whisper a coord to the object then the object llSetPos() to that location, other than that there isnt much other you can do
Seifert Surface
Mathematician
Join date: 14 Jun 2005
Posts: 912
08-22-2008 09:24
Or you can have the rezzer move around to the right places before rezzing. Or you can have the rezzer rez an intermediary object, which setposes to the correct location before itself rezzing the thing you actually want.
_____________________
-Seifert Surface
2G!tGLf 2nLt9cG
Meade Paravane
Hedgehog
Join date: 21 Nov 2006
Posts: 4,845
08-22-2008 09:24
Close to what Mrc said, but not exactly the same, is to add another object, a small/transparent/phantom container object, to contain the thing you really want rezzed.

When you want the rez to happen, rez the container object and whisper the position/rotation that you want the real object to be at. Have the container move to the desired spot and rez the real object.

This is a bit more complicated but it means that you don't need to change the real object to know how to move into position and look good while doing it.
_____________________
Tired of shouting clubs and lucky chairs? Vote for llParcelSay!!!
- Go here: http://jira.secondlife.com/browse/SVC-1224
- If you see "if you were logged in.." on the left, click it and log in
- Click the "Vote for it" link on the left
Winter Ventura
Eclectic Randomness
Join date: 18 Jul 2006
Posts: 2,579
08-22-2008 09:28
Or you can do what all the other unpackers do.. rez the object, and then have a slave script in the object move it to the desired coordinates. (which is more or less what MrC said)
_____________________

● Inworld Store: http://slurl.eclectic-randomness.com
● Website: http://www.eclectic-randomness.com
● Twitter: @WinterVentura
Fiona Haworth
Co-Owner of Prim Pads
Join date: 12 Dec 2007
Posts: 92
Thanks so much!!
08-22-2008 09:33
Some really great ideas
Tyken Hightower
Automagical
Join date: 15 Feb 2006
Posts: 472
08-22-2008 10:24
I do the following..

Put the following function in your rezzing script and pass it your rez parameters.

CODE

sim_rez(string object, vector target, rotation rot) {
integer packed_target = ((integer)target.x << 22) | ((integer)target.y << 13) | ((integer)target.z & 8191);
vector offset = target - <(integer)target.x, (integer)target.y, (integer)target.z>;
target = llGetPos();
target = <(integer)target.x + offset.x, (integer)target.y + offset.y, (integer)target.z + offset.z>;
llRezAtRoot(object, target, <0.0, 0.0, 0.0>, rot, packed_target);
}


This packs target data into an integer and a rez offset.

Then in your rezzed object, put a script like this, containing a second function:

CODE

rez_warp(integer data) {
vector target = <(data >> 22), ((data >> 13) & 511), (data & 8191)>;
vector offset = llGetPos();
target = target + offset - <(integer)offset.x, (integer)offset.y, (integer)offset.z>;

integer jumps = (integer)(llVecDist(llGetPos(), target) / 10.0) + 1;
if (jumps > 100) jumps = 100;
integer i = 1;
list rules = [PRIM_POSITION, target];
while ((i = i << 1) < jumps) rules = (rules = []) + rules + rules;
llSetPrimitiveParams(rules + llList2List(rules, (i - jumps) << 1, i));
}

default
{
on_rez(integer start)
{
if (start)
{
rez_warp(start);
llRemoveInventory(llGetScriptName());
}
}
}


This unpacks the data and uses WarpPos to move to the desired location.

You can remove the 'if (start)' there just in case the object ever needs to travel to <0, 0, 0> for some reason, but if you do, then know that rezzing it by hand will make it teleport there as well (since your start parameter is zero in this case).
_____________________