1.11.0(11) was supposed to fix this, but it overdoes it - sensors stop triggering at all after a region change.
Here's what I changed in Otter Monitor (read along if you have a copy, get the update to 1.3.7 in my stores or from any of your friends who have updated already - it's freely redistributable). First, since I already have a routine sense(integer onoff) that resets the sensors when you change settings, I added a new special value and made it sense(integer command), where command is SENSE_ON, SENSE,OFF, SENSE_TOGGLE, ....
So here's a general fix for any script using sensors:
CODE
// First, it's handy to have a sensor routine if you're
// going to be changing them multiple places...
integer SENSE_REFRESH = -2;
integer SENSE_TOGGLE = -1;
integer SENSE_OFF = 0;
integer SENSE_ON = 1;
integer sense_state = 0; // default to off.
sense(integer command)
{
// special cases
if(command == SENSE_REFRESH) command = sense_state;
else if(command == SENSE_TOGGLE) command = !sense_state;
if(command)
{
// Do stuff to set up your sensors here
llSensorRepeat(...);
if (command != sense_state)
{
// And maybe let your user know...
llSetText("Scanning!",<0,1,0>,1);
}
}
else
{
// Do stuff to clear your sensors here.
llSensorRemove();
llSetText("",<0,0,0>,0);
}
sense_state = command;
}
// ...
default
{
state_entry()
{
sense(SENSE_ON);
}
touch_start(integer n)
{
if(llDetectedKey(0) == llGetOwner()) sense(SENSE_TOGGLE);
}
// detect region changes or attachment.
change(integer what)
{
if(what & (CHANGED_REGION | CHANGED_TELEPORT | CHANGED_LINK))
sense(SENSE_REFRESH);
}
sensor(integer n)
{
//...
}
no_sensor()
{
//...
}
}