Outy's Curtain Drop/Retractor Source Viewable Script Version 1.1
This can be used to make retracting bed draperies, window curtains, blinds, even traps, or whatever else you can conceive of doing with it. It requires no scripting knowledge to use and will work in any prim. It stretches any prim's Z-axis to the length and at the rate you specify, and can retract it back.
However, the fancier you get with what you're doing, the more modification the script will need, depending on what you're using it for.
Curtain Drop/Retractor v1.0
by Outy Banjo
INSTRUCTIONS:
This script needs no modification to work in any prim. Just drop it in. Two things that you might want to adjust are the "endSize" and "rate". endSize specifies how long the prim will be when it has finished growing. The rate is how much it will grow every roughly 0.5 seconds.
The script is set up to make the prim stretch down to the specified endSize, and retract up to it's original size and position when activated again. You could easily change this to make it go up instead of down.
You may want to put the curtain prim(the prim that the script is in) into another prim slightly to hide the shuffling at the top when it's growing for a more natural look.
I've included three means of activation in this script. Touch will work as it is. The listen and link-message activation will need additional input from another script to work. I've also added some owner-only clauses and a few other things that can be uncommented to add a different behavior to the script.
Beyond the comments inside the script itself, this is the source code to my product and I(Outy Banjo) offer no support for it.
NOTES:
*When specifying your rate and endSize, it's best to pick a rate that divides evenly into both your start size(The length of the curtain prim's Z-axis when it's fully up) and your endSize(The length it will drop to).
For example, using a rate of 0.1 and a curtain starting length of 1.0 and an endSize of 5.0 meters will result in a precise 5.0 meters when fully dropped. If you put in a rate of 0.13 instead, it'd grow to 5.03 meters.
This is only important if you need it to drop an EXACT distance, otherwise, it'll be close enough to it, that it won't matter. Also, it doesn't matter for purposes of retracting. It will always retract to the same size and position no matter what goofy numbers are in there. (I haven't tested that statement against all numbers, particularly floats with values 8 digits past the decimal which probably could result in it not retracting to the same spot)
*Currently(1-7-2007), there is no llSetLocalPos() function in SL. This is instead determined by the prim a script resides in. So if your curtain is part of a linked set, do not make a curtain prim the master prim, or it will alter the position of the entire assembly. To reiterate: In a linked set, make sure all prims that will be manipulated by the Curtain Drop Retractor are child prims in the linked set.
TERMS OF USE:
The one stipulation is that you cannot sell or otherwise redistribute this script as a competing product. Meaning, offering this script for sale(Or free) as it is or by itself.
Example 1: You use this script to make retracting blinds that you sell. This is ok.
Example 2: "Hey, do you have a curtain script?" "Sure. Here you go." This is NOT ok.
So, hrmm, enjoy! But don't ask Outy Banjo for help! This is the source code to my Curtain Drop/Retractor. No garauntees are promised beyond that.
*Names and terms "Outy Banjo" and "Outy of the TURs" and the TUR Emblem are Copyright, Mark Shakocius.
2005-2007, O Scripting, An Outy Banjo Brand.
This item is also available in-world for purchase at:
O Scripting - Epione (141, 105, 80)
Outy Banjo Demo Area, SandyBeach West (30, 68, 22)
- Works in any prim
- Change two simple values to manipulate end size and rate
- 3 built-in modes for activation
- Commercially licensed
- Source-Viewable!
Awesome product, easy to use, a tad jumpy when in operation but, there is a warning about that in the sales blob. Going to give it a five, simply because a/ Outy did take the time to mention its jumpiness in the ad and b/ the support from Outy is phenominal.. Take away either or both of those two and I would give it.... 4.
I wish I could afford everything he makes - because i dont think ill ever be disappointed !
L$ 1,000
Use It Now
This item will be delivered directly to you or a friend in Second Life, unpacked and ready to use. No land or sandbox required.
- Copy
- Modify
- Transfer
- User Licensed