Difference between revisions of "Talk:LlVolumeDetect"

From Second Life Wiki
Jump to: navigation, search
(Created page with 'The caveat that llVolumeDetect only detects physical objects or avatars is wrong. It can detect scripted non phys if the script is in a moving physical prim. To allow for the...')
 
(I remembered where the script was. Here is the bit that shows how to detect non-phys active-scripted)
Line 1: Line 1:
 
The caveat that [[llVolumeDetect]] only detects physical objects or avatars is wrong. It can detect scripted non phys if the script is in a moving physical prim. To allow for the falling through the ground [[llSetBuoyancy]](1.0) first. -- '''[[User:EddyFragment Robonaught|Eddy]]'''  <sup><small>([[User talk:EddyFragment_Robonaught|talk]]|[[Special:Contributions/EddyFragment_Robonaught|contribs]])</small></sup> 21:07, 8 August 2009 (UTC)
 
The caveat that [[llVolumeDetect]] only detects physical objects or avatars is wrong. It can detect scripted non phys if the script is in a moving physical prim. To allow for the falling through the ground [[llSetBuoyancy]](1.0) first. -- '''[[User:EddyFragment Robonaught|Eddy]]'''  <sup><small>([[User talk:EddyFragment_Robonaught|talk]]|[[Special:Contributions/EddyFragment_Robonaught|contribs]])</small></sup> 21:07, 8 August 2009 (UTC)
 +
 +
To clarify this script will detect non-phys active-scripted objects on collision. Just push it into the object to detect.<lsl>integer type;
 +
 +
default
 +
{
 +
    state_entry()
 +
    {
 +
        llSetBuoyancy(1.0);
 +
        llSetStatus(STATUS_PHYSICS, TRUE);
 +
        llVolumeDetect(TRUE);
 +
    }
 +
    collision_start(integer detected)
 +
    {
 +
        type = llDetectedType(0);
 +
        if(type == 12)// SCRIPTED & PASSIVE
 +
        {
 +
            llSay(0, "I struck a stationary non-physical object (not an avatar) containing an active script");
 +
        }
 +
    }
 +
}</lsl>-- [[File:Eddy_CUBE_jpg.jpg|45px|link=User:EddyFragment Robonaught]]'''[[User:EddyFragment Robonaught|Eddy]]'''  <sup><small>([[User talk:EddyFragment_Robonaught|talk]]|[[Special:Contributions/EddyFragment_Robonaught|contribs]])</small></sup> 22:12, 11 September 2009 (UTC)

Revision as of 15:12, 11 September 2009

The caveat that llVolumeDetect only detects physical objects or avatars is wrong. It can detect scripted non phys if the script is in a moving physical prim. To allow for the falling through the ground llSetBuoyancy(1.0) first. -- Eddy (talk|contribs) 21:07, 8 August 2009 (UTC)

To clarify this script will detect non-phys active-scripted objects on collision. Just push it into the object to detect.<lsl>integer type;

default {

   state_entry()
   {
       llSetBuoyancy(1.0);
       llSetStatus(STATUS_PHYSICS, TRUE);
       llVolumeDetect(TRUE);
   }
   collision_start(integer detected)
   {
       type = llDetectedType(0);
       if(type == 12)// SCRIPTED & PASSIVE
       {
           llSay(0, "I struck a stationary non-physical object (not an avatar) containing an active script");
       }
   }

}</lsl>-- Eddy CUBE jpg.jpgEddy (talk|contribs) 22:12, 11 September 2009 (UTC)