Jump to content

llSetLinkAlpha help


JackRipper666
 Share

You are about to reply to a thread that has been inactive for 4091 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

lol yea I know it's pretty ugly for anyone who understands code. I did try though at one point sticking putting parts of it in one state together like this 

 counter = counter + gap;            llSetLinkAlpha(1, 0.0, ALL_SIDES);llSetLinkAlpha(2, 1.0, ALL_SIDES); state two;

 but I thought about that fade idea and just found this code here which looks like it would definitely do the trick if I could figure out how to make it do ping pong movement fading in an out from one prim to the next and backwards of course.

//////////////////////////////////////////////////////////// [K] Kira Komarov - 2011, License: GPLv3              //// Please see: http://www.gnu.org/licenses/gpl.html     //// for legal details, rights of fair usage and          //// the disclaimer and warranty conditions.              //////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////                   CONFIGURATION                      ////////////////////////////////////////////////////////////// Change this to the time between// fade-in and fade-out events.float TIME_BETWEEN_FADES = 7;// Change this to the time it takes// to fade-out the screen.float FADE_OUT_TIME = 0.2;// Change this to the time it takes// to fade-in the screen.float FADE_IN_TIME = 0.2;////////////////////////////////////////////////////////////                     INTERNALS                        ////////////////////////////////////////////////////////////integer o = -1;float f; default{    state_entry()    {        llSetTimerEvent(TIME_BETWEEN_FADES);    }     timer() {        llSetTimerEvent(0);        if(o = ~o) {            llSensorRepeat("", NULL_KEY, ACTIVE, 0.1, f=0.0, FADE_IN_TIME);            return;         }        llSensorRepeat("", NULL_KEY, ACTIVE, 0.1, f=1.0, FADE_OUT_TIME);    }    no_sensor() {        if(f<0.0 || f>1.0) {            llSensorRemove();            llSetTimerEvent(TIME_BETWEEN_FADES);            return;        }        if(!o) {            llSetLinkAlpha(2, f-=0.1, ALL_SIDES);            return;        }        llSetLinkAlpha(2, f+=0.1, ALL_SIDES);    }}

 

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4091 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...