Difference between revisions of "LlDetectedVel"
Jump to navigation
Jump to search
All Issues ~ Search JIRA for related Bugs
(Added Example) |
m |
||
Line 20: | Line 20: | ||
while (i < num) { | while (i < num) { | ||
llOwnerSay(llDetectedName(i) + " is moving at " + (string)llVecMag(llDetectedVel(i)) + " m/s."); | llOwnerSay(llDetectedName(i) + " is moving at " + (string)llVecMag(llDetectedVel(i)) + " m/s."); | ||
++i; | |||
} | } | ||
} | } |
Revision as of 04:27, 14 October 2007
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Summary
Function: vector llDetectedVel( integer number );36 | Function ID |
0.0 | Forced Delay |
10.0 | Energy |
Returns a vector that is the velocity of detected object number.
• integer | number |
number does not support negative indexes. Returns <0.0, 0.0, 0.0> if number is not valid sensed object.
Caveats
- If number is out of bounds the script continues to execute without an error message.
Examples
//Tells the name and velocity of all near-by avatars. default { state_entry() { llSensor("", "", AGENT, 10000, 10000); } sensor(integer num) { integer i = 0; while (i < num) { llOwnerSay(llDetectedName(i) + " is moving at " + (string)llVecMag(llDetectedVel(i)) + " m/s."); ++i; } } }
See Also
Articles
• | Detected |