LlDetectedVel

De DigiWiki.

(Différences entre les versions)
Djphil (discuter | contributions)
(Page créée avec « <lsl> // Tells the name and velocity of all near-by avatars. default { state_entry() { // Scan once for avatars within a 20 metre radius sphere llS… »)

Version actuelle en date du 31 janvier 2014 à 03:28

// 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.");
        }
    }
}
Outils personnels
  • Cette page a été consultée 504 fois.
donate
Google Ads