LlDetectedVel
De DigiWiki.
// Tells the name and velocity of all near-by avatars. default { state_entry() { // Scan once for avatars within a 20 metre radius sphere llSensorRepeat("", "", AGENT, 20.0, PI,1.0); } sensor(integer num) { // num will initially be 1 or more. When num is 1, the index of the detected avatar will be zero while(num--) { llOwnerSay(llDetectedName(num) + " is moving at " + (string)llVecMag(llDetectedVel(num)) + " m/s."); } } }