Difference between revisions of "LlStopLookAt"

From Second Life Wiki
Jump to navigation Jump to search
m
m (Replaced old <LSL> block with <source lang="lsl2">)
 
(One intermediate revision by one other user not shown)
Line 8: Line 8:
|caveats
|caveats
|constants
|constants
|examples=<lsl>
|examples=<source lang="lsl2">
default
default
{
{
Line 14: Line 14:
     {
     {
         llSensorRepeat("", "", AGENT, 20.0, PI, 0.2);
         llSensorRepeat("", "", AGENT, 20.0, PI, 0.2);
        //Detects avatars
     }
     }
   
   
Line 19: Line 20:
     {
     {
         llLookAt( llDetectedPos(0) + <0.0, 0.0, 1.0>, 3.0, 1.0 );
         llLookAt( llDetectedPos(0) + <0.0, 0.0, 1.0>, 3.0, 1.0 );
        //Looks at the nearest avatar.
     }
     }
   
   
Line 25: Line 27:
         llStopLookAt();
         llStopLookAt();
         llSensorRemove();
         llSensorRemove();
        //Stops looking at any avatar and removes the sensor.
     }
     }
}
}
</lsl>
</source>
|helpers
|helpers
|also_functions=*{{LSLG|llLookAt}}
|also_functions=*{{LSLG|llLookAt}}

Latest revision as of 11:42, 22 January 2015

Summary

Function: llStopLookAt( );
0.0 Forced Delay
10.0 Energy

Stop causing object to point at a target

Use in conjunction llLookAt or llRotLookAt.

Examples

default
{
    state_entry()
    {
        llSensorRepeat("", "", AGENT, 20.0, PI, 0.2);
        //Detects avatars
    }
 
    sensor(integer total_number)
    {
        llLookAt( llDetectedPos(0) + <0.0, 0.0, 1.0>, 3.0, 1.0 );
        //Looks at the nearest avatar.
    }
 
    touch_start(integer total_number)
    {
        llStopLookAt();
        llSensorRemove();
        //Stops looking at any avatar and removes the sensor.
    }
}

See Also

Functions

Deep Notes

Signature

function void llStopLookAt();