Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

facing prims

Evol Menoptra
Registered User
Join date: 25 Nov 2005
Posts: 7
07-18-2006 03:58
well I don't know much about scripting so I could pay for such script but I'm looking for a easy way to like have eyes or so rotate like following a target within a radius


if I can get help on this or someone sells such script let me know please
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
07-18-2006 09:26
llLookAt
sensor
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Evol Menoptra
Registered User
Join date: 25 Nov 2005
Posts: 7
cool
07-19-2006 00:21
well thanks and I tried the links but couln't get it quite working, sensors give reaction on approach but object won't move except only once

message me in game if able to work something out.....


tnx
Bitzer Balderdash
Dazed and Confused
Join date: 21 Dec 2005
Posts: 246
07-19-2006 01:49
make sure you are using llSensorRepeat()
Evol Menoptra
Registered User
Join date: 25 Nov 2005
Posts: 7
I tried
09-03-2006 07:06
this is the script I came up with.. adding different stuff together I tought and still can't have it work right... if sugestions or help it would be cool :) and yeah looks messy, I'm not a scripter just trying some thingies once in a while


==========================================================

vector AXIS_UP = <0,0,1>;
vector AXIS_LEFT = <0,1,0>;
vector AXIS_FWD = <1,0,0>;
vector target = <0, 20, 30>;
rotation getRotToPointAxisAt(vector axis, vector target) {
return llGetRot() * llRotBetween(axis * llGetRot(), target - llGetPos());
}


float strength = 1.0;
float damping = 1.0;

default


{
state_entry()
{
// llSensorRepeat ("", NULL_KEY, AGENT,40 , 0, PI);

llSensor("", NULL_KEY, AGENT, 40, PI);

}
sensor(integer total_number)


{
// vector target = llGetPos();
// vector target = <0, 20, 30>;

llSensorRepeat ("", NULL_KEY, AGENT,40 , 0, PI);

llRotLookAt(getRotToPointAxisAt(AXIS_UP, target), strength, damping);


llLookAt(target, strength, damping);


llRotLookAt(getRotToPointAxisAt(AXIS_FWD, target), strength, damping);


llRotLookAt(getRotToPointAxisAt(AXIS_LEFT, target), strength, damping);
// llWhisper(0, "Hello " + llDetectedName(0));

}
timer()
{

}

no_sensor()
{
}
}