|
Megg Demina
Registered User
Join date: 11 Jun 2007
Posts: 5
|
01-18-2008 04:52
I am looking for a script to put into a prim, that automatically moves/ cycles the level of transparency from opaque to transparent..and back to opaque again..I hope someone can help me =) (I want to make an object that looks like it is disapearing and re-appearing again..etc) Many thanks xxx
|
|
Django Yifu
Beat Island Gaffer
Join date: 7 May 2007
Posts: 189
|
01-18-2008 05:43
Use either llSetAlpha or llSetPrimitiveparams(PRIM_COLOR) with llSleep to step through the alpha fade and back again then reset the script using llResetScript(); to head back up to the beginning of the fade.
There is probably a more elegant method that some of the old timers can give you but as a starter this should get you going.
_____________________
Tread softly upon the Earth for you walk on my face.
|
|
Kahiro Watanabe
Registered User
Join date: 28 Sep 2007
Posts: 572
|
01-18-2008 05:53
You should use a "for" cycle or a "while" a timer too. I don't like to script in forums, if you need help IM me.  .-
|
|
Squirrel Wood
Nuteater. Beware!
Join date: 14 Jun 2006
Posts: 471
|
01-18-2008 05:54
This script should provide you with the requested alphaness.
float f_alpha = 0.0; float f_step = 0.01;
default { on_rez(integer start_param) { llResetScript(); } state_entry() { llSetTimerEvent(0.05); } timer() { f_alpha += f_step; if (f_alpha+f_step > 1.0) {f_step = -f_step;} if (f_alpha+f_step < 0.0) {f_step = -f_step;} llSetAlpha(f_alpha,ALL_SIDES); } }
|