Millie Thompson
Resident Moderator
Join date: 18 Dec 2002
Posts: 364
|
11-04-2004 09:52
I'm looking for a way to change prim colors on a linked object with two scrips. One script being a "master" script that can be modified with RGB color settings, then upon a command in the chat window send that color command to prims with a "slave" script that would communicate with the master script and change the color accordingly.
What I would like is to just edit the master script and have the slave scripts change the prim colors that they're in.
My latest avatar creation is only 1/2 done and once complete adding any new colors to the plethora of prims the full avatar will be made up of will be extremely difficult.
Is this possible?
_____________________
Millie Thompson I am a Resident Moderator. I am a volunteer moderator on this forum, NOT a Linden. If you have any issues or concerns with your Second Life experience please go to Second Life Support
|
Samhain Broom
Registered User
Join date: 1 Aug 2004
Posts: 298
|
11-04-2004 10:03
I do not think you can have one prim communicate with another that is attached. If they are all linked you can use a script that llMessageLink()'s the prims in the set and command them all to change colors. Not sure though.
[EDIT]Sorry, I just re-read that, and it is confusing... What I meant to say is, two separate prims attached to the body cannot communicate with each other. I do believe they can communicate with each other through the llMessageLink() function if they are linked.
_____________________
rm -rf /bin/ladden #beware of geeks bearing grifts
|
McWheelie Baldwin
Registered User
Join date: 9 Apr 2004
Posts: 154
|
11-04-2004 10:09
This is possible, and I have already developed a system that does this. I use it in my Sentou Style shoes and cap. If you would like to see the system in action, IM me, and I will show you how it works.
Edit: Samhain Broom is correct. Two separate attachments can not communicate via linked messages. It would be nice if they could, using the avatar as part of the link set, but unfortunately, that just isn't the case currently. If you are looking to have separate attachments change based on a master prim, you will most likely have to use listens and whispers on a private channel. The system I developed could be easily modified to work in this manner.
McW
|
Moleculor Satyr
Fireflies!
Join date: 5 Jan 2004
Posts: 2,650
|
11-04-2004 10:10
Oh hell yeah, it's possible. Write a script that JUST has a link_message event. Pick a number. That number is your "channel", much like a listen channel, but for linked messages and it doesn't cause lag. Send vectors out on this channel from the main script using llMessageLinked, with the vector in the string field. Any time the other scripts hear the vector, they take it and change their color to that vector.
Simple. You can get even more complex by sending ou the vector to specific link numbers only, letting you change only certain prims at a time. The channel thing lets you send out other kinds of data if you want on other channels, so you can simply sort by channel entirely without having to have the data-type included in the string itself.
EDIT: Oh yeah, but the color changes won't work between different attachments. They all have to be part of the same one. No messages through your bodies' nervous system, I'm afraid.
_____________________
</sarcasm>
|
Millie Thompson
Resident Moderator
Join date: 18 Dec 2002
Posts: 364
|
11-04-2004 10:52
From: McWheelie Baldwin This is possible, and I have already developed a system that does this. I use it in my Sentou Style shoes and cap. If you would like to see the system in action, IM me, and I will show you how it works.
Edit: Samhain Broom is correct. Two separate attachments can not communicate via linked messages. It would be nice if they could, using the avatar as part of the link set, but unfortunately, that just isn't the case currently. If you are looking to have separate attachments change based on a master prim, you will most likely have to use listens and whispers on a private channel. The system I developed could be easily modified to work in this manner.
McW That seems to be what I'm looking for. I would like to use such a system with a Guardian Legend avatar I'm working on.
_____________________
Millie Thompson I am a Resident Moderator. I am a volunteer moderator on this forum, NOT a Linden. If you have any issues or concerns with your Second Life experience please go to Second Life Support
|