|
Sharon Ewry
Registered User
Join date: 30 Nov 2006
Posts: 33
|
02-04-2007 09:00
hi
I have been trying for about 3 hours now to get a prim to randomly changes colours every 1 second, just once i managed it but it changed all the linked prims to the same colour. The thing i am making has several prims in and i want them to all change colour themselfs randomly, can anyone either tell me a script that would work for this please or at least give me some tips?
Thanks
Shaz x
|
|
Jacques Groshomme
Registered User
Join date: 16 Mar 2005
Posts: 355
|
02-04-2007 09:14
Take a look at llSetLinkColor, although you'll have to loop through each link to use it, which may cause a noticeable delay between prims changing. If you want an instant change, you can use a llMessageLinkedmessage to talk to all prims at the same time, then rely on a script in each prim to change the color through llSetColor or llSetPrimitiveParams.
|
|
Sharon Ewry
Registered User
Join date: 30 Nov 2006
Posts: 33
|
02-04-2007 09:19
Thanks Jacques Groshomme But i don't want the prims to be talking to each other at all, i just want them individually random changing colours with a script in each of the prims i want changing colours and i still ain't no closer grrrrrrrrr
Tearing my hair out here lol
Shaz x
|
|
Jacques Groshomme
Registered User
Join date: 16 Mar 2005
Posts: 355
|
02-04-2007 09:29
The delay may not even be noticeable. The first option I mentioned is worth a shot, and only requires a script in the parent prim. default { state_entry() { llSetTimerEvent(1.0); } on_rez(integer start_param) { llResetScript(); } timer() { integer i; float red; float green; float blue; for(i=1; i<=llGetLinkNumber(); i++) { red = llFrand(1.0); green = llFrand(1.0); blue = llFrand(1.0); llSetLinkColor(i, <red, green, blue>, ALL_SIDES); } } }
|
|
Kokoro Fasching
Pixie Dust and Sugar
Join date: 23 Dec 2005
Posts: 949
|
02-04-2007 09:32
From: Sharon Ewry Thanks Jacques Groshomme But i don't want the prims to be talking to each other at all, i just want them individually random changing colours with a script in each of the prims i want changing colours and i still ain't no closer grrrrrrrrr Tearing my hair out here lol Shaz x /15/6e/150577/1.htmlPut that in each prim, and away you go.
|
|
Sharon Ewry
Registered User
Join date: 30 Nov 2006
Posts: 33
|
02-04-2007 09:38
Grrrrrrrrrrrrrrrr lol
Thanks Jacques Groshomme that works fantastic, its very similar to what i had written but i can see where i had gone wrong now hehe
Thanks loads for that, I learn best by looking at others scripts.
Shaz x
|