// Invisibility Prim Refresh v1.1a // by Beatfox Xevious // last updated Oct. 21, 2004 //How It Works //SL has a few special system textures that are only accessible by UUID key and that possess properties which no other textures do. Namely, a prim using one of these textures is capable of rendering whatever avatar textures and textures containing alpha channels are inside or behind it completely invisible. Normal textures that do not contain alpha channels will remain untouched. This is useful for hiding part or all of an avatar while keeping non-alpha attachments visible. Great for creating digitigrade legs, skeletons, Rayman -- the sky's the limit! //Note that water and trees are alpha textures, and as such will be hidden by invisibility prims. Also, the sky behind such a prim may appear just a tad discolored. As of this writing, shiny/bumpy objects render correctly when behind invisiprims that use this script (this was not always the case). //How to Use //Simply place the "Invisibility Prim Public" script in whatever prims you want to make into invisiprims. It may take up to a minute for the invisibility effect to activate. Any copies you make of the prims will also contain the script automatically. //About the Refresh Script -- CHANGED IN v1.1 //The invisibility textures can be a little quirky, and frequently they will make more than just avatars and alpha textures invisible. Something to do with the texture loading order -- I don't fully understand it myself. Anyway, the refresh script fixes that by automatically alternating between 2 different invisibility textures every 30 seconds. It's synchronized to the SL clock so that all copies of this prim (Invisibility Prim Public v1.1, NOT v1.0) will refresh at the same time. It's a good idea to leave the script unmodified, since if there are any other invisiprims in the current render-area that use the same invisibility textures but do not have the default refresh timing, the refresh may not work properly. refresh() { llSetTexture("38b86f85-2575-52a9-a531-23108d8da837", ALL_SIDES); llSleep(30); llSetTexture("e97cf410-8e61-7005-ec06-629eba4cd1fb", ALL_SIDES); } default { state_entry() { llSetPrimitiveParams([PRIM_BUMP_SHINY, ALL_SIDES, PRIM_SHINY_NONE, PRIM_BUMP_BRIGHT]); llOffsetTexture(0.468, 0.0, ALL_SIDES); llScaleTexture(0.0, 0.0, ALL_SIDES); llSetAlpha(1.0, ALL_SIDES); llSetTimerEvent(5); } timer() { if ((integer)llGetWallclock() % 60 < 10) { refresh(); } } }