MiG2107 Posted February 27, 2014 Share Posted February 27, 2014 Here's what im trying to make:When you say "Show" in normal chat, the object will apear from transparency, hold for a certain amount of time, say 20 seconds, and fade back out to transparency again. I need help creating this. Link to comment Share on other sites More sharing options...
Rolig Loon Posted February 27, 2014 Share Posted February 27, 2014 Welcome aboard! You've got the right plan. Take a look at the function llSetAlpha, which will control your object's transparency. Turn the timer on in a listen event, triggered by your secret word. The only mild trick you will need to perform is to change the rate of your timer once it engages, so that it runs faster while you loop from alpha = 1.0 down to alpha = 0.0. When you have a script that's looking halfway promising, feel free to post it here for comment. That's what the LSL Scripting forum is for. Link to comment Share on other sites More sharing options...
LepreKhaun Posted February 27, 2014 Share Posted February 27, 2014 Welcome to the forums! Everything Rolig said with the addition of adding the option of doing the fade within a loop (possibly having a llSleep(0.01); in it) in your timer event handler (requiring only a local variable for the current transparency) as opposed to using the timer from that point on (which would require a global variable). Only caveat to that approach would be having event messages queued until the loop finished. Benefit would be finer control of the effect and one less global variable. Link to comment Share on other sites More sharing options...
revochen Mayne Posted February 28, 2014 Share Posted February 28, 2014 Another way to achieve an alpha fade in or out is by using a texture grid and the llSetTextureAnim function. This might be the less lag way, especially as llSetTextureAnim is client side. Link to comment Share on other sites More sharing options...
LepreKhaun Posted February 28, 2014 Share Posted February 28, 2014 Rolig Loon wrote: ... Take a look at the function llSetAlpha, which will control your object's transparency... Errr, I just realized that's prim specific. For an object (which may or may not be a link set) one needs to use llSetLinkAlpha(LINK_SET, alphaFloatVar, ALL_SIDES); where alphaFloatVar is, of course, the decrementing transparency control. See http://wiki.secondlife.com/wiki/LlSetLinkAlpha , for details, which also has a fade in/out script that the OP could easily mod to their specs. Link to comment Share on other sites More sharing options...
Rolig Loon Posted February 28, 2014 Share Posted February 28, 2014 That's true. Since the OP didn't specify and is a beginning scripter, I figured it was smarter to suggest the simple llSetAlpha instead of leaping directly into the confusion of more complicated functions -- certainly not SLPPF, which can make experienced scripters blanch. That is a nice fader script, though, I agree. :smileyhappy: Link to comment Share on other sites More sharing options...
LepreKhaun Posted March 1, 2014 Share Posted March 1, 2014 revochen Mayne wrote: Another way to achieve an alpha fade in or out is by using a texture grid and the llSetTextureAnim function. This might be the less lag way, especially as llSetTextureAnim is client side. Looks good on paper, have you ever attempted this approach? 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