Some Library items confuse llRezObjectWithParams
tracked
Qie Niangao
I now know of (at least) two categories of Objects in the Library:
- those that return the same key to llRezObjectWithParams() as object_rez() obtains with the item rezzes, and
- those for which the function returns a different key than accompanies the event.
Log In
Maestro Linden
tracked
Maestro Linden
under review
Thanks for the report. I can confirm that llRezObjectWithParams is returning bogus keys when rezzing very old assets from library, such as "Domino". object_rez is returning the correct UUID of the rezzed object.
Here's an example run from my script shown below; llRezObjectWithParams returns a different UUID each time, but it is definitely not the correct key for the object that was rezzed.
Object: Rezzed 'Domino'. llRezObjectWithParams returned key c1faf84d-6bb8-a281-bcfe-2bdfe0e488e9
Object: c1faf84d-6bb8-a281-bcfe-2bdfe0e488e9 does not appear to be an object rezzed in this region.
Object: object_rez returned ed357bc0-060d-dcdc-cce3-ebf0cf33cfc6
Object: ed357bc0-060d-dcdc-cce3-ebf0cf33cfc6 seems to be the correct key for the rezzed 'Domino'
The affected object assets are stored in a legacy format, so unfortunately there's no way to add a script to report the llGetKey() value without also destroying the repro case.
string name;
checkKey(key k)
{
if(llKey2Name(k) == name)
{
llOwnerSay((string)k + " seems to be the correct key for the rezzed '" + name + "'");
}
else
{
llOwnerSay((string)k + " does not appear to be an object rezzed in this region.");
}
}
default
{
touch_start(integer total_number)
{
name = llGetInventoryName(INVENTORY_OBJECT, 0);
key k = llRezObjectWithParams(name, [
REZ_PARAM, 1,
REZ_POS, <0, 0, 1> * llGetRot(), TRUE, FALSE
]);
llOwnerSay("Rezzed '" + name + "'. llRezObjectWithParams returned key " + (string)k);
checkKey(k);
}
object_rez(key k)
{
llOwnerSay("object_rez returned " + (string)k);
checkKey(k);
}
}