CODE
default
{
state_entry()
{
llSensorRepeat("", "", AGENT, 20.0, PI, 0.2);
}
sensor(integer total_number)
{
vector pos = llGetPos();
vector target = llDetectedPos(0);
target.z = pos.z;
llLookAt(target, 3,1);
}
no_sensor()
{
llStopLookAt();
}
}
note: this looks like almost every other one of these scripts out there, only thing different is the no_sensor(), the example on the wiki for llLookAt is nearly identical to this but does it with less lines of code, and makes a little more sense as the coding isn't as terse.