This is what I currently have... mind you, I'm *really* new to scripting so i'm kinda lucky it worked in general LOL
vector root;
float ellipse_x;
float ellipse_y;
float angle = 0;
string axis_name = "Hub";
default {
on_rez( integer Parameter ) { llResetScript(); }
state_entry() {
root = llGetPos(); // default axis is around myself (sensor will update)
ellipse_x = 1
; // r_max these will control the size and shape of the elipse
ellipse_y = .5; // r_min
llSetTimerEvent( 0.2 ); // or more depending how smooth and fast it's to be
// non moving target
llSensor( axis_name, NULL_KEY, PASSIVE | ACTIVE, 20.0, PI ); // 20m range
// moving target
// llSensorRepeat(axis_name, "", 20.0, ACTIVE | PASSIVE, PI, 2.0); // 20m range
}
timer() {
angle += 5.0 * DEG_TO_RAD; if( angle >= TWO_PI ) angle -= TWO_PI;
float x = ellipse_x * llCos(angle);
float y = ellipse_y * llSin(angle);
llSetPrimitiveParams( [ PRIM_POSITION, root + <x, y, 0>, PRIM_ROTATION, llEuler2Rot( <0.0, 0.0, angle> ) ] );
}
sensor(integer num_detected)
{
root = llDetectedPos(0);
}
no_sensor()
{
llWhisper(0, axis_name + " not found.");
llSensorRemove();
}
}