llSensor doesn't see me
|
|
Learjeff Innis
musician & coder
Join date: 27 Nov 2006
Posts: 817
|
11-29-2006 20:41
I created an object with a script, and on entry to a state it calls
llSensorRepeat("", NULL_KEY, -1, 10.0, TWO_PI, 2.0)
Well, I'm standing right there and I don't get any sensor events. I do get no_sensor events (one every two seconds). I've tried all the constants for the object type and gave up and passed -1 as a hail mary. In reality it'll only be looking for a certain av, but since I can't detect myself, I'm using NULL_KEY.
Why doesn't it sense me? If I create a box, it sees that. Can't this be used to sense avatars?
Thanks, Jeff
|
|
Vares Solvang
It's all Relative
Join date: 26 Jan 2005
Posts: 2,235
|
11-29-2006 21:13
I would say to look at the sensor event. What are the parameters in it? In other words is it set to only look for objects and not AGENTS?
(the llSensor(string name, key id, integer type, float range, float arc) part).
|
|
Tyken Hightower
Automagical
Join date: 15 Feb 2006
Posts: 472
|
11-29-2006 21:55
From: Learjeff Innis I created an object with a script, and on entry to a state it calls
llSensorRepeat("", NULL_KEY, -1, 10.0, TWO_PI, 2.0)
Well, I'm standing right there and I don't get any sensor events. I do get no_sensor events (one every two seconds). I've tried all the constants for the object type and gave up and passed -1 as a hail mary. In reality it'll only be looking for a certain av, but since I can't detect myself, I'm using NULL_KEY.
Why doesn't it sense me? If I create a box, it sees that. Can't this be used to sense avatars?
Thanks, Jeff Use AGENT for the third field, instead of -1. I pasted it in with that, worked for me. default { state_entry() { llSensorRepeat("", NULL_KEY, AGENT, 10.0, TWO_PI, 2.0); }
sensor(integer number) { llOwnerSay(llDetectedName(0)); } no_sensor() { llOwnerSay("None."); } }
|
|
Burke Prefect
Cafe Owner, Superhero
Join date: 29 Oct 2004
Posts: 2,785
|
11-29-2006 22:18
Just a note, if you're WEARING the sensor, it doesn't pick you up.
|
|
Tyken Hightower
Automagical
Join date: 15 Feb 2006
Posts: 472
|
11-29-2006 22:22
From: Burke Prefect Just a note, if you're WEARING the sensor, it doesn't pick you up. Truth.
|
|
Learjeff Innis
musician & coder
Join date: 27 Nov 2006
Posts: 817
|
11-29-2006 22:36
OK -- that's the first one I tried, but I'll try it again. There are various bugs at the moment, maybe it's a bad time to learn! Any case, glad to hear that it SHOULD pick up people. Thanks Jeff Yup, it's working now! 
|
|
Nynthan Folsom
Registered User
Join date: 29 Aug 2006
Posts: 70
|
12-01-2006 18:07
Dunno if this would PREVENT it from sensing, but you should be using PI rather than TWO_PI. If you read the wiki, the sensor angle parameter specifies HALF the angle of the cone.
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
12-01-2006 18:28
From: Nynthan Folsom Dunno if this would PREVENT it from sensing, but you should be using PI rather than TWO_PI. If you read the wiki, the sensor angle parameter specifies HALF the angle of the cone. TWO_PI is correct. TWO_PI = 360 degrees PI = 180 degrees PI_BY_TWO = 90 degrees
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|
|
carol Wombat
Registered User
Join date: 29 Jan 2006
Posts: 16
|
12-01-2006 20:29
I just use PI.
|
|
Joannah Cramer
Registered User
Join date: 12 Apr 2006
Posts: 1,539
|
12-01-2006 21:03
From: Jesse Barnett TWO_PI is correct. TWO_PI = 360 degrees PI = 180 degrees PI_BY_TWO = 90 degrees "If you read the wiki, the sensor angle parameter specifies HALF the angle of the cone." ^^ so specifying PI as half of the cone, you get the other half in matching PI size, for 2 * PI total...
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
12-01-2006 21:12
eeeeep!!!! Yep I stand corrected and actually my sensors use PI. Brain Fart 
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|
|
Learjeff Innis
musician & coder
Join date: 27 Nov 2006
Posts: 817
|
12-01-2006 21:52
Thanks for the tip!
|