Difference between revisions of "LlVolumeDetect"

From Second Life Wiki
Jump to navigation Jump to search
m (change collision to collision_start)
Line 1: Line 1:
{{LSL_Function/boolean|detect}}
{{LSL_Function
{{LSL_Function
|func_id=248|func_sleep=0.0|func_energy=10.0
|func_id=248|func_sleep=0.0|func_energy=10.0
|func=llVolumeDetect|p1_type=integer|p1_name=detect
|func=llVolumeDetect|p1_type=integer|p1_name=detect
|func_footnote
|func_footnote
|func_desc=If '''detect''' is {{LSLG|TRUE}}, object becomes phantom but triggers {{LSLG|collision_start}} and {{LSLG|collision_end}} events when other objects start and stop interpenetrating.
|func_desc=If '''detect''' is [[TRUE]], object becomes phantom but triggers [[collision_start]] and [[collision_end]] events when other objects start and stop interpenetrating.
|return_text
|return_text
|spec
|spec
|caveats=*Must be applied to the root prim.
|caveats=
*Does not work on attachments.
*Does not work on attachments.
*Only detects physical objects
*Only detects physical objects. -- ''This might be a bug''
*Can only be applied to the root prim. -- ''This is probably a bug.''
|constants
|constants
|examples=<lsl>// by Cory Bjornson
|examples=<lsl>default
 
default
{
{
state_entry()
    state_entry()
{
    {
llVolumeDetect(TRUE); // Starts llVolumeDetect
        llVolumeDetect(TRUE); // Starts llVolumeDetect
llSetStatus(STATUS_PHANTOM, TRUE); // Makes the Prim Phantom
    }
}
    collision_start(integer total_number)
collision_start(integer total_number)
    {
{
        llSay(0, "Detected!"); // Tells you when something penetrates the prim
llSay(0, "Detected!"); // Tells you when something penetrates the prim
    }
}
}</lsl>
}</lsl>
|helpers
|helpers
Line 34: Line 33:
|also_articles
|also_articles
|notes
|notes
|permission
|negative_index
|sort=VolumeDetect
|sort=VolumeDetect
|cat1=Collision
|cat1=Collision

Revision as of 20:42, 24 April 2008

Summary

Function: llVolumeDetect( integer detect );

If detect is TRUE, object becomes phantom but triggers collision_start and collision_end events when other objects start and stop interpenetrating.

• integer detect TRUE enables, FALSE disables

Caveats

  • Does not work on attachments.
  • Only detects physical objects. -- This might be a bug
  • Can only be applied to the root prim. -- This is probably a bug.
All Issues ~ Search JIRA for related Bugs

Examples

<lsl>default {

   state_entry()
   {
       llVolumeDetect(TRUE); // Starts llVolumeDetect
   }
   collision_start(integer total_number)
   {
       llSay(0, "Detected!"); // Tells you when something penetrates the prim
   }
}</lsl>

See Also

Events

•  collision_start
•  collision
•  collision_end

Functions

•  llPassCollisions

Deep Notes

Search JIRA for related Issues

Signature

function void llVolumeDetect( integer detect );