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));
}
}
}
