Difference between revisions of "Talk:LlDetectedGrab"

From Second Life Wiki
Jump to navigation Jump to search
m
Line 20: Line 20:


Hiya Strife. The direction not the distance? Urgh. I can't think what to say about that but tooltips should be the first against the wall when the revolution comes. I'll have another look at it. I'm guessing your goo computer is still offline. Difficult to take a quick gander in that case.
Hiya Strife. The direction not the distance? Urgh. I can't think what to say about that but tooltips should be the first against the wall when the revolution comes. I'll have another look at it. I'm guessing your goo computer is still offline. Difficult to take a quick gander in that case.
See ya in the mix.
See ya in the mix. -- [[User:EddyFragment Robonaught|Eddy]] 07:36, 15 May 2009 (UTC)

Revision as of 00:36, 15 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)

Uhhh it's been a while since I've used llDetectedGrab and the article is all boiler plate (makes some effort to fix). The function is only useful in the touch event, where it will returns the vector which is the direction of the dragging motion. I could be wrong about the last bit... it's been a couple years since I've played with it. It has some strange effects when used in HUD attachments which make it very difficult to use I recall. -- Strife (talk|contribs) 10:56, 14 May 2009 (UTC)

Hiya Strife. The direction not the distance? Urgh. I can't think what to say about that but tooltips should be the first against the wall when the revolution comes. I'll have another look at it. I'm guessing your goo computer is still offline. Difficult to take a quick gander in that case. See ya in the mix. -- Eddy 07:36, 15 May 2009 (UTC)