Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Doesn't it work that you put down just no_sensor?

Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
09-20-2006 07:56
hmm... I might miss something. But if anyone knows about this, please tell me that.
CODE
default
{
state_entry()
{
llSensorRemove();
}
touch_start(integer total_number)
{
llSensorRepeat("", "", AGENT, 2.0, PI, 1.0);
}
no_sensor()
{
llSay(0, "Nobody is here.");
llSensorRemove();
}
}
Put this script into a prim and touch it while you stand near by it. Then you walking away, it should say, "Nobody is here". But it didn't work.
But I found it work when you put down a vacant sensor event like below.
CODE
default
{
state_entry()
{
llSensorRemove();
}
touch_start(integer total_number)
{
llSensorRepeat("", "", AGENT, 2.0, PI, 1.0);
}
sensor(integer num_detected)
{

}
no_sensor()
{
llSay(0, "Nobody is here.");
llSensorRemove();
}
}
Does this make sense?
_____________________
:) Seagel Neville :)
Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
09-20-2006 08:17
I suspect it's some kind of bug... perhaps in the way the bytcode is assembled, as the event trip for a sensor is only installed if there's a sensor() event, which no_sensor() relies on.

But no... it doens't make much sense. :)
_____________________
Aakanaar LaSalle
Registered User
Join date: 1 Sep 2006
Posts: 132
09-20-2006 18:23
if a prim in a forest says "nobody here" and no one is around to hear it, does it really make a sound?
Rich Cordeaux
Registered User
Join date: 8 May 2006
Posts: 26
09-21-2006 14:15
I ran into this a week or two ago myself, when making my vehicle return to my inventory (lost & found folder) if I were killed while piloting it. (by using warpPos to fly off the world)

I wouldn't really call it a bug - more of an annoyance.
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
09-21-2006 16:21
From: Aakanaar LaSalle
if a prim in a forest says "nobody here" and no one is around to hear it, does it really make a sound?


So that s what all those extra voices in my head are!!!!!!!!!!!!!!!!!