Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

New function: llGetObjectDetails

RJ Source
Green Sky Labs
Join date: 10 Jan 2007
Posts: 272
08-30-2007 06:06
as of 1.18.3

http://www.lslwiki.net/lslwiki/wakka.php?wakka=llGetObjectDetails
Lyn Mimistrobell
(waiting)
Join date: 11 Jan 2007
Posts: 179
08-30-2007 06:50
Nice function but it's an optional update.. don't rely on it just yet.
PK Dailey
Registered User
Join date: 23 Dec 2006
Posts: 2
08-30-2007 06:55
I presume that new LSL functions rely on the version of server code, not viewer code.
Benja Kepler
Registered User
Join date: 16 Dec 2006
Posts: 53
Tooltip typos
08-30-2007 07:04
there are a couple of typos in the tooltip for this



OBJECT_DETAILS_NAME should be OBJECT_NAME

and

OBJECT_DESCRIPTION should be OBJECT_DESC

see also

http://jira.secondlife.com/browse/VWR-2265
Benja Kepler
Registered User
Join date: 16 Dec 2006
Posts: 53
08-30-2007 07:11
My first thought of what to do with this was to go to Abbotts and see what was flying, and what velocity:-

From: someone


vector vel;
list details;
list listObjDetails;
integer counter;
default
{
state_entry()
{
listObjDetails = [OBJECT_NAME,OBJECT_DESC,OBJECT_VELOCITY];
}

touch_start(integer total_number)
{
llSetTimerEvent(10.0);
}
timer()
{
llSensor("",NULL_KEY,ACTIVE,256.0,PI);
}
sensor(integer num_detected)
{
for(counter=0;counter<num_detected;counter++)
{
details = llGetObjectDetails(llDetectedKey(counter),
listObjDetails);
vel = llList2Vector(details,2);
if(vel != ZERO_VECTOR)
llOwnerSay(llList2String(details,0) + " " + (string)vel);
}

}
}



which gave

From: someone

A.I. Airship - Abbotts Loop C <-5.43805, -0.42576, -1.49557>
Tiarnalalon Sismondi
Registered User
Join date: 1 Jun 2006
Posts: 402
08-30-2007 08:04
I could see this as having interesting applications.

If nothing else, the code you just used could be expanded to make a real air traffic control at SL airfields :)
Lex Neva
wears dorky glasses
Join date: 27 Nov 2004
Posts: 1,361
08-30-2007 08:12
But... in that sample code you gave, the llGetObjectDetails() call is redundant. All of the information you request is already provided in the llDetected* functions.
Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
08-30-2007 09:23
I'd say the best use for this function is in verification of objects through something like creator-verification. Additionally, if you have two objects that talk to eachother, but you want to restrict the max-communication range to something other than the 10,20,100 meters of llWhisper,llSay,and llShout...a get-object-pos from the listen event is nice.

I'm sure there are uses...and what makes me happy is that a lot of the new functions coming out have been about data collection...which makes manipulation of said data a lot easier.
_____________________
--AeonVox--

Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms chasing ghosts, eating magic pills, and listening to repetitive, addictive, electronic music.
Johan Laurasia
Fully Rezzed
Join date: 31 Oct 2006
Posts: 1,394
08-30-2007 11:19
From: Kenn Nilsson
I'd say the best use for this function is in verification of objects through something like creator-verification. Additionally, if you have two objects that talk to eachother, but you want to restrict the max-communication range to something other than the 10,20,100 meters of llWhisper,llSay,and llShout...a get-object-pos from the listen event is nice.

I'm sure there are uses...and what makes me happy is that a lot of the new functions coming out have been about data collection...which makes manipulation of said data a lot easier.


You can already get distance with llVectDist()....
RJ Source
Green Sky Labs
Join date: 10 Jan 2007
Posts: 272
08-30-2007 11:32
I'm considering that the ability to get the description field of a separate object might have some good uses.
Benja Kepler
Registered User
Join date: 16 Dec 2006
Posts: 53
08-30-2007 12:59
From: Lex Neva
But... in that sample code you gave, the llGetObjectDetails() call is redundant. All of the information you request is already provided in the llDetected* functions.


LOL

The llGetObjectDetails is a new LSL function. I had to try it out!
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
08-30-2007 15:40
Interesting that everyone has their own pet aspirations for this function. What it gives beyond the llDetectedMumbles is Creator, Description, and Group. I like Group because now we not only can tell if an object is in the same group as the scripted object, but can define operations that are applicable to objects belonging to a list of groups. I just hope this signals that some further elevation of groups to first-class LSL constructs might be in the offing.

Perhaps demonstrating a flair for the obvious: This function lets us get most of the info for which we'd otherwise use llDetected functions, even when there's no detection involved, as in a list of otherwise known objects (e.g., in the sim but outside sensor range, or attached to an avatar and hence invisible to sensors), or within events like listen() where we have an object's UUID but no way to use the llDetected functions (which might be especially handy in conjunction with the relatively new llRegionSay).
Shadow Subagja
Registered User
Join date: 29 Apr 2007
Posts: 354
08-30-2007 15:51
This can also be used heavily to obtain location without unnecessarily burdening the server with ongoing sensors for things like pets, vehicle followers, you name it.
Talarus Luan
Ancient Archaean Dragon
Join date: 18 Mar 2006
Posts: 4,831
08-30-2007 18:24
Aye, once you have the key of an object, you don't have to use a sensor to track it anymore. plus, there are things that it returns that are not available via llDetected*, like Creator and Description, for example.
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
08-30-2007 18:35
Hey! I'll take whatever new llFunctions they want to throw out to us and find a use for them. Keep em coming!

Please, please, please give me a script performance function though for just owned objects so that I don't have to be an island owner or estate manager. Give us the tools to write more efficient scripts!
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
Jotheph Nemeth
Registered User
Join date: 9 Aug 2007
Posts: 142
08-31-2007 08:32
From: Talarus Luan
Aye, once you have the key of an object, you don't have to use a sensor to track it anymore. plus, there are things that it returns that are not available via llDetected*, like Creator and Description, for example.


Exactly, especially since sensor only works 96 meters away.
Ordinal Malaprop
really very ordinary
Join date: 9 Sep 2005
Posts: 4,607
08-31-2007 08:50
From: Shadow Subagja
This can also be used heavily to obtain location without unnecessarily burdening the server with ongoing sensors for things like pets, vehicle followers, you name it.

Actually, I would find this immensely useful for a project that I am currently working on.

*taps fingers impatiently for next update - though I never thought I would ever say that*
_____________________
http://ordinalmalaprop.com/forum/ - visit Ordinal's Scripting Colloquium for scripting discussion with actual working BBCode!

http://ordinalmalaprop.com/engine/ - An Engine Fit For My Proceeding, my Aethernet Journal

http://www.flickr.com/groups/slgriefbuild/ - Second Life Griefbuild Digest, pictures of horrible ad griefing and land spam, and the naming of names
Lex Neva
wears dorky glasses
Join date: 27 Nov 2004
Posts: 1,361
08-31-2007 08:58
I can definitely think of a few scripts I've written that would benefit from this function.

I'd be curious to know what happens if you call this function on an avatar key. Can you get the key of the group they've currently got active? If so, this is HUGE.
Scott Tureaud
market base?
Join date: 7 Jun 2007
Posts: 224
08-31-2007 09:29
Woot The Sweetness.

edit: can't be all caps :(
RJ Source
Green Sky Labs
Join date: 10 Jan 2007
Posts: 272
08-31-2007 09:35
This:

From: someone

default
{
state_entry()
{
list x = llGetObjectDetails(llGetOwner(), [OBJECT_GROUP]);
llOwnerSay(llDumpList2String(x, ", ";));
}


Returns: 00000000-0000-0000-0000-000000000000

So nope, doesn't work to get an owner's group.
RJ Source
Green Sky Labs
Join date: 10 Jan 2007
Posts: 272
08-31-2007 09:41
From: PK Dailey
I presume that new LSL functions rely on the version of server code, not viewer code.


Once a script with llGetObjectDetails is compiled and in an object, that object code will function for anyone, regardless of their viewer version. But someone with an older viewer can't compile the script with llGetObjectDetails until they upgrade.
Baron Hauptmann
Just Designs / Scripter
Join date: 29 Oct 2005
Posts: 358
09-06-2007 11:37
Haven't tried this, but can it be used to get position of a child? If so, it could work well with llSetLinkPrimitiveParams . . . at least to move child prims around!
Danielz Shackle
Registered User
Join date: 30 Apr 2006
Posts: 100
09-06-2007 23:29
From: Benja Kepler
My first thought of what to do with this was to go to Abbotts and see what was flying, and what velocity:-



which gave


I tried to use the example in your post, as well as my own i had been writing.

no matter what i do i get the error message when trying to save / compile..

(9, 29) : ERROR : Name not defined within scope

_

nevermind, just trealized the update isnt out yet except preview/beta. i thought it jsut came out on reg viewer... well i cant wait for this.