JackRipper666 Posted February 12, 2013 Share Posted February 12, 2013 If you made it all in one state you probably had a chance to make it work smoothly.All that state changing takes server time and it is unpredictable to say how much.Does the code compile at all? It certainly needs cleaning!:smileysurprised::):smileyvery-happy: Link to comment Share on other sites More sharing options...
JackRipper666 Posted February 12, 2013 Author Share Posted February 12, 2013 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 More sharing options...
Recommended Posts
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