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
Door Iris_Open_Script  

Iris_Open_Script

Iris Open Script by Cera Murakami.lsl

Category: Door
By : Cera Murakami
Created: 2010-01-10 Edited: 2010-01-10
Worlds: Second Life

the Zip file

Download all files for Iris_Open_Script
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Iris_Open_Script_by_Cera_Murakami_1.lsl
1
2 //********************************************************
3 //This Script was pulled out for you by YadNi Monde from the SL FORUMS at http://forums.secondlife.com/forumdisplay.php?f=15, it is intended to stay FREE by it s author(s) and all the comments here in ORANGE must NOT be deleted. They include notes on how to use it and no help will be provided either by YadNi Monde or it s Author(s). IF YOU DO NOT AGREE WITH THIS JUST DONT USE!!!
4 //********************************************************
5
6
7
8
9
10
11 // Iris Open Script by Cera Murakami - 7/21/2006
12 // Touch-sensitive iris opening door
13 // Toggles open and closed state for a hole in a torus as an iris door
14 // Put this script into a flattened torus.
15
16 // Iris opening door script, using a torus
17 //This script enables you to use a torus as a simple touch-activated iris door, for science fiction or organic building projects. It uses a torus as the prim for the door, and opens or closes the hole in the torus to operate it.
18 //
19 //To use, make a flattened torus, the height and width you need for your door, and about 0.1M to 0.05M thick. The 'door frame' for this can be another torus, or an oval or round hole in another prim.
20 //
21 //Note that the same script should also be able to be used with a different prim shape for the iris door prim, by changing the specifications in the two llSetPrimitiveParams statements to suit the other prim shape. I'll experiment some more with that soon, and will offer some variations here later.
22
23
24 // ----- Global Variables ------------------
25 integer g_OpenNow; // True (1) if iris is 'open' now
26
27 default
28 {
29 on_rez(integer param)
30 {
32 }
33
35 {
36 if(g_OpenNow == TRUE) // Prim is in open state, so calculate new 'closed' size
37 {
38 state WaitToClose;
39 }
40 else // Prim is in a closed (or undefined state), so calculate new 'open' size
41 {
42 g_OpenNow = FALSE;
43 state WaitToOpen;
44 }
45 }
46 }
47
48 state WaitToClose // Iris is Open, and waiting to close
49 {
50 touch_start(integer total_number)
51 {
52 llSetPrimitiveParams([PRIM_TYPE, PRIM_TYPE_TORUS, 0, <0.0, 1.0, 0.0>, 0.0, <0.0, 0.0, 0.0>, <1.0, 0.5, 0.0>, <0.0, 0.0, 0.0>, <0.0, 1.0, 0.0>, <0.0, 0.0, 0.0>, 1.0, 0.0, 0.0]);
53 g_OpenNow = FALSE;
54 state WaitToOpen;
55 }
56 }
57
58 state WaitToOpen // Iris is closed, and waiting to open
59 {
60 touch_start(integer total_number)
61 {
62 llSetPrimitiveParams([PRIM_TYPE, PRIM_TYPE_TORUS, 0, <0.0, 1.0, 0.0>, 0.0, <0.0, 0.0, 0.0>, <1.0, 0.05, 0.0>, <0.0, 0.0, 0.0>, <0.0, 1.0, 0.0>, <0.0, 0.0, 0.0>, 1.0, 0.0, 0.0]);
63 g_OpenNow = TRUE;
64 state WaitToClose;
65 }
66 }// END //

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