Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

DetectedGrab only returns Zero vector?

Alexander Yeats
Registered User
Join date: 8 Sep 2005
Posts: 188
10-24-2005 17:03
And when ever I try to grab the block and move it the hand gets the little lock. If I take out my touch events, no lock.

Is that by design? Or is there something I am missing?


CODE
 

vector mypos;
default
{
state_entry()
{
mypos = llGetPos();
}

touch_start(integer num)
{
llSetStatus(STATUS_BLOCK_GRAB, FALSE);
}

touch(integer num)
{
integer i;
for (i=0; i < num; i++)
llSay(0, (string)(llDetectedGrab(i) - mypos));
}
}
_____________________
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
10-24-2005 17:08
Set STATUS_BLOCK_GRAB to TRUE. I think you can in the touch_start event, but just to be sure, do it in state_entry.
==Chris
_____________________
October 3rd is the Day Against DRM (Digital Restrictions Management), learn more at http://www.defectivebydesign.org/what_is_drm