Talk:LlDetectedGrab

From Second Life Wiki
Revision as of 23:24, 13 May 2009 by EddyFragment Robonaught (talk | contribs) (New page: The example below causes an inaccurate return of <0.0,0.0,0.0> when I grab the object the script is in. Thus the spoken result is far from correct (unless I stand in the corner if the regi...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The example below causes an inaccurate return of <0.0,0.0,0.0> when I grab the object the script is in. Thus the spoken result is far from correct (unless I stand in the corner if the region! lol). Since I was trying to write an example I have nothing to go on to discover if I am using this function correctly. Would anyone care to comment?

{code} default {

   state_entry()
   {
       llSetStatus(PRIM_PHYSICS,TRUE);
   }
   touch_start(integer num_detected)
   {
       llSay(0,(string)llKey2Name(llDetectedKey(0)) + " has grabbed me from roughly" + (string)llRound(llVecDist(llDetectedGrab(0), llGetPos())) + " meters away.");
   }

} {code}