Don't click here unless you want to be banned.
LSL Wiki :
llGetObjectDetails
HomePage
::
PageIndex
::
RecentChanges
::
RecentlyCommented
::
UserSettings
:: You are crawl423.us.archive.org
**##[[list]] llGetObjectDetails([[key]] id, [[list]] params)##** Returns details of the [[object]] with the key **##id##** specified in the **##params##** list. The details are returned inside a list in the same order as the parameters are given. The value ##OBJECT_UNKNOWN_DETAIL## is returned inside the list for an unknown parameter given. Notes: -If one [[value]] of the list params is not an [[integer]], that value is silently ignored and ##OBJECT_UNKNOWN_DETAIL## is not returned. -The function is Simulator-Local. It will not return results on input-keys in other simulators. ''Looks like this functions works on both main [[agent]]s and child agents. Means, the avatar of any agent connected to the sim can be detected'' -ThomasShikami ''**This will be corrected by [[http://jira.secondlife.com/browse/SVC-774]] to 96m into adjacent sims**'' -If you teleport this function will also track to the next sim once grid-wide, but only once, from then on it continues to report the last position. Though the x,y,z parameters are wrong, they remain the local values of the original sim. But you could teleport there and re-run your script. **This will be corrected by [[http://jira.secondlife.com/browse/SVC-774]]** -This function was first introduced with [[SL]] 1.18.3. -This function can be used in combination with [[llGetLinkKey]] to determine the parameters of a [[child]] prim in a [[link]]ed object. ===Parameters=== |||c **Query** || **List Entry Type** || **Object Application** || **Agent Application** || || ##OBJECT_NAME## || [[string]] || Returns object name. Similar to [[llKey2Name]] || Returns agent name. Similar to [[llKey2Name]] || || ##OBJECT_DESC## || [[string]] || Returns object description. || Returns empty string. || || ##OBJECT_POS## || [[vector]] || Returns object position. || Returns agent position. || || ##OBJECT_ROT## || [[rotation]] || Returns object rotation. || Returns agent rotation. || || ##OBJECT_VELOCITY## || [[vector]] || Returns object velocity. || Returns agent velocity. || || ##OBJECT_OWNER## || [[key]] || Returns the key of the object owner. ---- Returns [[NULL_KEY]] if deeded to a group. || Returns agent key (identical to input key id)|| || ##OBJECT_GROUP## || [[key]] || Returns the key of the object's set group. || Returns NULL_KEY. || || ##OBJECT_CREATOR## || [[key]] || Returns the key of the object creator. || Returns NULL_KEY. || || ##OBJECT_RUNNING_SCRIPT_COUNT## || [[integer]] || Returns the number of [[llSetScriptState running]] scripts on the object. || Returns the number of running scripts inside all of the agent's attachments. || || ##OBJECT_TOTAL_SCRIPT_COUNT## || [[integer]] || Returns the total number of scripts, running or not, on the object. || Returns the total number of scripts, running or not, inside all of the agent's attachments. || || ##OBJECT_SCRIPT_MEMORY## || [[integer]] || Returns the maximum script memory that might be used by the object. || Returns the maximum script memory that might be used by all of the agent's attachments. ||| Example: %%(lsl)list params = llGetObjectDetails(id, [OBJECT_NAME, OBJECT_POS, OBJECT_OWNER]);%% A Better Example (it should be noted that this example will stop working when ""<a href=http://jira.secondlife.com/browse/SVC-774>SVC-774</a>"" is implemented): %%(lsl)//A script that will, in an object, follow someone if they teleport - //and report back to you where they went (in global co-ords it goes and gets them, even on islands). //Using a hack in llGetObjectDetails. //This script was made by some sandbox goers when llGetObjectDetails first came out. //This is actually derived from Jana Kamachi's version of the sandbox script //(although she is not the original script's creator) - messed around with by yours truely ;) list keys = []; vector last = <0,0,0>; default { state_entry(){ llListen(3,"",llGetOwner(),""); llSensorRepeat("",NULL_KEY,AGENT,96,PI*2,1); llSetTimerEvent(0.00001); } timer(){ integer i=0; list temp; vector raw; @home; for(i=0;i<llGetListLength(keys);i++){ temp = llGetObjectDetails(llList2Key(keys,i),[OBJECT_POS]); raw = llList2Vector(temp,0); if((raw.x > 256 || raw.x < 0) || (raw.y > 256 || raw.y <0)){ llOwnerSay(llKey2Name(llList2Key(keys,i)) + " has left the sim to " + (string)raw); last = raw; keys = llDeleteSubList(keys,i,0); jump home; } } } sensor(integer n_m){ integer i=0; for(i=0;i<n_m;i++){ if(llListFindList(keys,[llDetectedKey(i)])==-1){ keys+=[llDetectedKey(i)]; llOwnerSay("Indexed: " + llKey2Name(llDetectedKey(i))); } } } changed(integer c){ if(c == CHANGED_TELEPORT){ keys = []; } } touch_start(integer n_m){ llMapDestination(llGetRegionName(),last,<0,0,0>); } listen(integer c, string name, key id, string msg){ llMapDestination(llGetRegionName(),(vector)msg,<0,0,0>); } }%% - Tre Giles ---- [[Functions]] | [[Object]]
Valid XHTML 1.0 Transitional
::
Valid CSS
:: Powered by
WakkaWiki 0.1.2