Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

A psuedo-evil Titler

Vere Rhode
Registered User
Join date: 23 Jul 2008
Posts: 3
06-13-2009 20:21
Right, so, I am coding a titler... The usual kind that lets people set your titler, but I added a few commands to give the owner the ability to set their own title, clear their title, force it to go off every so often, and an ignore list....


But I am stumped.

IT works correctly except that I can't seem to be able to remove old listens... Every time it goes off anyone can use an old channel and set the title, instead of just the new one...

Well, can any of you see what I did wrong? OR see any obvious hacks that have better solutions?
Edit: Blanked out code.... sorry
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
06-13-2009 20:47
without digging into the code (kinda big for a titler..) if you change states, you will clear all previous listens, and then only the one you reinitialize will run (most people do this with a reflect state, that just sends them back to the previous state). the other options are resetting (which I doubt you want to do with that code and it's many states) and keeping track of the listen handles (which are integers set by the llListen call, so just variable = llListen( blah ), and then you can turn off that particular listen with llListenRemove( variable ).
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Vere Rhode
Registered User
Join date: 23 Jul 2008
Posts: 3
06-13-2009 21:04
I did that... the listen I want to remove is set into a handler... and set to llListenRemove it at the end of the listen event...
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
06-14-2009 00:48
you are setting up a new listen each time you run through the timer, which is generating a new handle which is being saved over the old one... so you might want to remove that listen before you declare the new one (since there is no guarantee the listen event will get used in a specific period.)

you might also consider taking the listen out of state entry and just preserving the one in the attach event (or vice versa), and setting that to only listen to the owner, and canceling it in the changed event (CHANGED_OWNER) it'd save you needing a separate channel for the owner, and or some of your filtering in the listen
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Vere Rhode
Registered User
Join date: 23 Jul 2008
Posts: 3
06-14-2009 18:54
Hmm, That might work...
Hyperbolic Bombastic
Registered User
Join date: 6 Jun 2009
Posts: 7
06-20-2009 15:29
By cutting the code out of your post upon getting an answer, you are defeating the purpose of this sub forum. Great job!