Join us in Outworldz at www.outworldz.com:9000 or follow us:

Search dozens of selected web sites for OpenSim and LSL script

New! Script Meta-Search will search thousands of scripts here and at other sites for LSL or Opensim scripts.
Loading

Want to add a script or a project? Upload it and a half million people will see it and your name here this year.

Home   Show All
Category: Contributor: Creator
Picture Frame L98pictureframe  

L98pictureframe

L9.08-picture-frame.lsl

Category: Picture Frame
By : Dana Moore
Created: 2010-01-10 Edited: 2010-01-10
Worlds: Second Life

the Zip file

Download all files for L98pictureframe
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. L98pictureframe_1.lsl
1
2 // Copyright (c) 2008, Scripting Your World
3 // All rights reserved.
4 //
5 // Scripting Your World
6 // By Dana Moore, Michael Thome, and Dr. Karen Zita Haigh
7 // http://syw.fabulo.us
8 // http://www.amazon.com/Scripting-Your-World-Official-Second/dp/0470339837/
9 //
10 // You are permitted to use, share, and adapt this code under the
11 // terms of the Creative Commons Public License described in full
12 // at http://creativecommons.org/licenses/by/3.0/legalcode.
13 // That means you must keep the credits, do nothing to damage our
14 // reputation, and do not suggest that we endorse you or your work.
15
16 // Listing 9.8: The Frame (Root Prim)
17 float HOLLOW_SIZE = 0.75;
18
19 integer gNumTextures;
20 list gTextures;
21 integer gCurrentTexture;
22 integer gWhichFrame;
23
24 initFrame()
25 {
26 float hollow = HOLLOW_SIZE;
27 vector cut = <0,1.0,0>;
28 vector twist = <0,0,0>;
29 vector taper_b = <0.85,0.85,0>; // a basic cube would be <1,1,0>
30 vector topshear = <0.0,0.0,0>;
32 cut, hollow, twist, taper_b, topshear] );
33 }
34
35 default
36 {
37 state_entry() {
38 initFrame();
39 gWhichFrame = 0;
41 gCurrentTexture = 0;
43 }
44 on_rez(integer _n) {
46 }
47 timer() {
48 string name = llGetInventoryName( INVENTORY_TEXTURE, gCurrentTexture );
49 key id = llGetInventoryKey( name );
50 vector size = llGetScale()*HOLLOW_SIZE;
51 llMessageLinked(LINK_ALL_OTHERS, gWhichFrame, (string)size, id);
52 gWhichFrame = !gWhichFrame;
53 gCurrentTexture++;
54 if(gCurrentTexture == gNumTextures) {
55 gCurrentTexture = 0;
56 }
57 }
58 }
59 // END //

Back to the Best Free Tools in Second Life and OpenSim.