Difference between revisions of "Talk:LlDetectedGrab"

From Second Life Wiki
Jump to navigation Jump to search
Line 14: Line 14:
}
}
</lsl>
</lsl>
[[User:EddyFragment Robonaught|Eddy]] 06:31, 14 May 2009 (UTC)

Revision as of 23:31, 13 May 2009

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?

<lsl> 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.");
   }

} </lsl>

Eddy 06:31, 14 May 2009 (UTC)