Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Listen Filters and States

Gearsawe Stonecutter
Over there
Join date: 14 Sep 2005
Posts: 614
02-05-2006 13:39
lets say I some basic crud below
CODE

default
{
if(TRUE) state another;
}

state another
{
state entry()
{
handle = llListen(0, "", owner, "");
}
if (TRUE) state default;
}

now does this keep adding update more listen filters every time it goes to the another state? Or is the Listen filter removed everytime it leave the another state? or should I being adding in a state_exit and llListenRemove(handle)?
Jade Bard
Registered User
Join date: 7 Jul 2004
Posts: 106
02-05-2006 13:45
whenever you change states all the listens from that state are removed automatically.
_____________________

Ben Bacon
Registered User
Join date: 14 Jul 2005
Posts: 809
02-06-2006 00:20
off topic - be aware that "if(TRUE) state XXX" is a hack that is only needed in functions (and should be avoided even there)

within event-handlers, just use
CODE
default
{
state_entry()
{
state another;
}
}

state another
{
state entry()
{
handle = llListen(0, "", owner, "");
state default;
}
}