Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llMessageLinked vs. Chat

Basement Desade
Registered User
Join date: 14 Jul 2006
Posts: 91
06-01-2009 17:49
I'm a builder who is learning scripting in self defense. I plod along, but usually I get there, eventually, sometimes with help from this forum.

Today I finally figured out how to do the whole link message thing, and I've been going back through items and replacing the old chat-oriented scripts. The way I did things with chat most of the time was to have people click on a prim, that prim said something, and then something happened somewhere else.

I read, however, that having a bunch of listens all going on at once is a bad thing, and decided to do something about mine.

This afternoon I have been going through a train I built awhile back. It's a pretty simple thing; it just goes around in a big circle. However, each of twenty wheels had a listen for texture rotation scripts, and I had others for the whistle, the whistle steam, for texture switching on the connecting rods, and so on. So, getting rid of all these should be better for sim performance, I think.

The thing I've noticed, however, while link message works most of the time, it has been a bit erratic, at least so far. Some of the wheels apparently miss the message to stop, the texture switching scripts miss their cues, and so on. I never had these problems using the chat scripts.

Granted, there are a couple factors that could be affecting this. One, the train is tethered to its axis by a 50m prim, with the parent as that axis, of course. Also, it is one of those wonderful wacky server days, with scripts taking forever to load, refusing to be saved, and so on.

So my questions are these: Are link messages generally as reliable as chat commands? Or do they dislike megas, or anything else, for that matter? Or should I just wait 'til tomorrow, and perhaps things will work better?

Or, of course, in order to get better sim performance, do we sacrifice build performance?
Basement Desade
Registered User
Join date: 14 Jul 2006
Posts: 91
Oookay....
06-01-2009 23:37
Well, to answer my own question, the sim restarted, and suddenly everything worked hunkey-dorey. I did read Void's thing on the wiki about problems sending link messages to a lot of prims, and I thought it might be that, (I replaced 84 listens in on linkset) but that no longer appears to be the problem. Well, actually, there is no longer a problem. :)

So how may ARE a lot of prims, anyway?
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
06-02-2009 02:43
good to hear that the sim was just being goofy, I hated that bug, and don't ever want to see it again... you have no idea the frustration it caused


as to whether they're more reliable... yes, if only at the level of timeliness. but you also get multiple type in a single message, and less chance of collisions or unexpected data, since you control what bounces around in their as opposed to chat that anyone can use.

it's still a good idea to filter, I have a habit of using the scripts name to check incoming messages, so that if I put other scripts in the object later they can't accidently feed each other bad data.

the one thing you need to watch out for is that a script that sends a link message to the same prim it's in can hear it's own message (unlike chat commands) so it's possible to have an infinite loop there, of a script sending out a message and then responding to the message itself. (and it's a fun way to store data if you want to grind the sim up, and guarantee that you lose all data on a sim reset, or inventory take, but there is lots of space, and it doesn't count against your script size so.........)
_____________________
|
| . "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...
| -
Basement Desade
Registered User
Join date: 14 Jul 2006
Posts: 91
06-04-2009 23:26
From: Void Singer
the one thing you need to watch out for is that a script that sends a link message to the same prim it's in can hear it's own message (unlike chat commands) so it's possible to have an infinite loop there, of a script sending out a message and then responding to the message itself.


Like a microphone feeding-back. :) I read about that, too, but I probably would have at least been suspicious that that might happen on my own. Thanks for the warning, though. No sim chewing here. :)