Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llSensor not firing?

bucky Barkley
Registered User
Join date: 15 May 2006
Posts: 200
07-31-2006 15:42
I am working on something that will take chat commands or touches,
and then record the position of the agent who touched it (think: easy
to config teleporter...)

Summary: why do I have to be so close to the object to fire off llSensor()?

So here is a bare bones example that I am stumped on. When I put this
in a prim and click on it, or chat at it, it works fine.. until I get about 10m
away! Is there some limit where I can't get llSensor to fire? I note that
when it does work, it picks up agents within the 96 m range just fine.

CODE

default
{
state_entry()
{
llSay(0, "Hello, Avatar!");
llListen(23, "", "", "");
}

touch_start(integer total_number)
{
llSay(0, "Touched.");
llSensor("", NULL_KEY, AGENT, 96, PI);
}


listen(integer channel, string name, key id, string msg) {
llSensor("", NULL_KEY, AGENT, 96, PI);
}


sensor(integer total_number) {
integer i;

for (i = 0; i < total_number; i++) {
llWhisper(0, "--> " + llDetectedName(i));

vector curPos = llDetectedPos(i);
integer x = llRound(curPos.x);

llWhisper(0, " @ x" + (string)llRound(curPos.x) +
" y: " + (string)llRound(curPos.y) +
" z: " + (string)llRound(curPos.z));
}
}
}

Adrian Zobel
Registered User
Join date: 4 Jan 2006
Posts: 49
07-31-2006 15:49
I notice that llWhisper has a range of ten meters. Maybe it's working but you just don't hear it when it's further away. llOwnerSay might be more useful for testing.

If it's not that... are you across a sim border when you are more than ten meters away? Sensors usually (but not always) tend to stop at the edge of the sim.
bucky Barkley
Registered User
Join date: 15 May 2006
Posts: 200
awesome! that was it... dont whisper...
07-31-2006 15:56
Cool, wasn't the sensor that was the problem at all :-)

I got tripped up the fact that the prim couldn't reach me to report position.

Now I can move on to storing data, generating dialogs, and so on. thanks!