Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Which listen is less laggy?

SqueezeOne Pow
World Changer
Join date: 21 Dec 2005
Posts: 1,437
05-29-2007 10:42
So I'm making something with multiple objects that will change color by typing specific commands on channel 2. There are a lot of parts that will be affected and I'm trying to figure out a low-lag way to deal with it.

Would it cause less lag to have one object listen to the chat channel and all of the other prims listen to that one object or is there a better way to go about it?

I'll admit I'm a script-tard so I only have a rudimentary knowledge of what the hell I'm doing!

Thanks!
_____________________
Semper Fly
-S1. Pow

"Violence is Art by another means"

Visit Squeeze One Plaza in Osteria. Come for the robots, stay for the view!http://slurl.com/secondlife/Osteria/160.331/203.881
Jeff Kelley
Registered User
Join date: 8 Nov 2006
Posts: 223
05-29-2007 18:53
Use listen to communicate with different objects. Use llMessageLinked to communicate with different prims in a same object. llMessageLinked is faster and less laggy.

To change colors of multiple PRIMS belonging to a same OBJECT, use llSetLinkColor.
Dnel DaSilva
Master Xessorizer
Join date: 22 May 2005
Posts: 781
05-30-2007 00:12
ALWAYS use llMessageLinked to talk to prims in the same object, having a listen in each prim (I see WAY too many bling, and other jewelry scripts that do this) is highly laggy even if filtered well.
_____________________
Xessories in Urbane, home of high quality jewelry and accessories.

Coming soon to www.xessories.net

Why accessorize when you can Xessorize?
Ace Albion
Registered User
Join date: 21 Oct 2005
Posts: 866
05-30-2007 01:13
On the other hand, using listens instead of linkmessages might cut down a great deal on help request IMs from people who unlinked their item.

Just saying :D (I use linkmessages for this stuff, and I get the IMs!)
_____________________
Ace's Spaces! at Deco (147, 148, 24)
ace.5pointstudio.com
Gearsawe Stonecutter
Over there
Join date: 14 Sep 2005
Posts: 614
05-30-2007 04:32
If you are only chaing the color on other prims with in a linkset please use llSetLinkColor. Less script is a big factor in lag. An empty script that sits there doing nothing still takes script time.
SqueezeOne Pow
World Changer
Join date: 21 Dec 2005
Posts: 1,437
05-30-2007 12:26
Thanks for the feedback everyone! Let me give more details to see if this will make a difference...

What I'm making is a mech suit av (multiple objects on the av) with two kinds of color change: body and trim.

It's actually the second generation in a line of avs I make and I'm trying to make everything more precise with scripting and more detailed in building. It's not going to be moddable beyond the color and texture change options it will have.

I'm thinking the messagelink might be the way to go. I'd just have one prim on each object listen for the /2 chat command and everything else listen to those prims. Considering how many prims are in the suit it should cut down chat listens considerably!

Now would it make things cleaner if one object (perhaps attached to the HUD) was listening to chat and everything else was listening to that object?

Thanks again for all your help!
_____________________
Semper Fly
-S1. Pow

"Violence is Art by another means"

Visit Squeeze One Plaza in Osteria. Come for the robots, stay for the view!http://slurl.com/secondlife/Osteria/160.331/203.881
Ace Albion
Registered User
Join date: 21 Oct 2005
Posts: 866
05-31-2007 00:35
The listens don't care whether it's an avatar or an object that's doing the talking, but...

having 6-10 listens on channel 2, versus having them on some randomly assigned channel configured to the HUD (which uses no listens because it's touch based) would possibly be better. I'm not sure it's a huge deal, but it might be a tidy way to do it anyway. You can put more stuff into the HUD then, possibly, and keep it all in one place, the attachments would be "dumb".
_____________________
Ace's Spaces! at Deco (147, 148, 24)
ace.5pointstudio.com
Dnel DaSilva
Master Xessorizer
Join date: 22 May 2005
Posts: 781
05-31-2007 00:44
You will still have to have listeners on each attachment, as the HUD will have to use llSay.
_____________________
Xessories in Urbane, home of high quality jewelry and accessories.

Coming soon to www.xessories.net

Why accessorize when you can Xessorize?
Marcush Nemeth
Registered User
Join date: 3 Apr 2007
Posts: 402
05-31-2007 01:09
From: Dnel DaSilva
You will still have to have listeners on each attachment, as the HUD will have to use llSay.

Yes, but you can set the channel on the hud and the scripts in the prims to some off-channel, like -135246, which has a LOT less traffic then channels 0-9, which means less listen events are triggered, which means less lag. It's not so much the listen that's causing the lag, it's all the events resulting from those listens that causes lag.