Difference between revisions of "LlVolumeDetect"
Jump to navigation
Jump to search
All Issues ~ Search JIRA for related Bugs
Keltic Thor (talk | contribs) 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 | |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= | |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> | |examples=<lsl>default | ||
default | |||
{ | { | ||
state_entry() | |||
{ | |||
llVolumeDetect(TRUE); // Starts llVolumeDetect | |||
} | |||
collision_start(integer total_number) | |||
{ | |||
llSay(0, "Detected!"); // Tells you when something penetrates the prim | |||
} | |||
}</lsl> | }</lsl> | ||
|helpers | |helpers | ||
Line 34: | Line 33: | ||
|also_articles | |also_articles | ||
|notes | |notes | ||
|sort=VolumeDetect | |sort=VolumeDetect | ||
|cat1=Collision | |cat1=Collision |
Revision as of 20:42, 24 April 2008
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Summary
Function: llVolumeDetect( integer detect );248 | Function ID |
0.0 | Forced Delay |
10.0 | Energy |
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.
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>