|
Anjo Mirabeau
Registered User
Join date: 20 Aug 2005
Posts: 266
|
05-09-2006 18:27
This is the script I am working with...but how do I get 2 eyes to blink at the same time? Thank you for any help! default { state_entry() { llSetText("", <0,1,0>,1); llSetTimerEvent(10.0); // Time the eye is black. } timer() { //integer number = llGetInventoryNumber(INVENTORY_TEXTURE); //float rand = llFrand(number); //integer choice = (integer)rand; //string name = llGetInventoryName(INVENTORY_TEXTURE, choice); //if (name != ""  //{ llSetTexture("eye", ALL_SIDES); llSleep(0.1); // Keep eyes open for 5 secs (white) llSetTexture("white fur", ALL_SIDES); //} } }
|
|
Kokiri Saarinen
Quoted for truth
Join date: 7 Jan 2006
Posts: 44
|
Timing
05-09-2006 18:36
Theres a number of ways you could design the two eyes to blink at the same time. The best is probably a link message system, where on the timer event you send a message to the other eye to blink as well.
If the two eyes are not linked, then you should try using llSay on an absurdly high channel for the same effect, although this is more lag prone than using link messages.
Good Luck! ^^
|
|
jrrdraco Oe
Insanity Fair
Join date: 28 Oct 2005
Posts: 372
|
05-09-2006 18:36
I dont know if its a bad idea, but if you use two linked eyes as a different attachment and set the texture for the whole LINKSET you would be able to make it blink both at the same time.
Using two different eyes would probably never sync, since part of the processing runs at the clientside, sending messages between objects will probably delay and unsync it.
|
|
Kokiri Saarinen
Quoted for truth
Join date: 7 Jan 2006
Posts: 44
|
05-09-2006 18:51
Especially in a laggish area, then communication between two objects can be become horribly slow. It would be best to be able to set another objects texture remotely, but alas, I don't believe thats possible.
|
|
Goshua Lament
Registered User
Join date: 25 Dec 2003
Posts: 703
|
05-09-2006 20:31
I'd say that the link message method is going to be your best bet for this, because using llSay and Listeners will both be inneficient AND lag prone.
I suspose you could make a 2 or 4 or whatever prim set with JUST the eyes and attach that to a different point than the skull for the head and just use a script that changed ALL the textures for the eye attachment.
_____________________
Flickr Second Life Photo GalleryI no longer regularly login to SecondLife, but please contact me if an issue arises that needs my attention.
|
|
Anjo Mirabeau
Registered User
Join date: 20 Aug 2005
Posts: 266
|
05-10-2006 07:42
Thank you very much for the help. I think I will try making the eyes a separate attachment linkset.
|
|
Keknehv Psaltery
Hacker
Join date: 11 Apr 2005
Posts: 1,185
|
05-10-2006 19:25
You can't change textures remotely. The only method to change remote textures is by having a script in the remote prim and communicating with it to instruct it to change textures.
|