Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llGetScale on another object?

Tyg Jarrico
Registered User
Join date: 29 May 2005
Posts: 98
08-02-2005 09:44
I have a square called Processor.

In the Contents are of Processor, I'd like to put an object called Widget.

How do I make the Processor script get the dimensions (llGetScale) of Widget?

Thanks.

Tyg
Catherine Omega
Geometry Ninja
Join date: 10 Jan 2003
Posts: 2,053
08-02-2005 12:45
From: Tyg Jarrico
I have a square called Processor.

In the Contents are of Processor, I'd like to put an object called Widget.

How do I make the Processor script get the dimensions (llGetScale) of Widget?
You can't get the dimensions of an object that exists within inventory -- it's not "real" at that point. You'll need to rez a copy of it and then have it say its scale. You can use the start parameter option in llRezObject on the Processor and on_rez in the Widget to tell Widget that it's supposed to enter into "scale saying" mode, then die.
_____________________
Need scripting help? Visit the LSL Wiki!
Omega Point - Catherine Omega's Blog
Tyg Jarrico
Registered User
Join date: 29 May 2005
Posts: 98
08-02-2005 13:25
Very clever but I don't want to put any scripts into Widget, since Widget can be anything placed into Processor.

After I rezz Widget (on temp, so Widge dies automatically), is there a way that Processor can find out the scale of Widget, so Processor can do things with that information?
Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
08-02-2005 13:31
From: Tyg Jarrico
Very clever but I don't want to put any scripts into Widget, since Widget can be anything placed into Processor.

After I rezz Widget (on temp, so Widge dies automatically), is there a way that Processor can find out the scale of Widget, so Processor can do things with that information?
You still need to rez it, but "processor" can use a sensor to get "widget"'s key, then get its bounding box.

EDIT: Err, wait. Easier still (I forgot about this!) use the object_rez() event, which passes the rezzed "Widget"s key, and get the bounding box from inside that event.
_____________________
Tyg Jarrico
Registered User
Join date: 29 May 2005
Posts: 98
08-02-2005 13:45
Thank you very much. That's exactly what I needed. I'll try it out.

Tyg