From 7dd1963ca2af305b4d124191ce90b821475b5813 Mon Sep 17 00:00:00 2001 From: Jessica Pixel Date: Mon, 17 Nov 2014 13:57:20 -0500 Subject: [PATCH] Create [LP] DEPTH CONTROL DOWN BUTTON.lsl --- BLOCK-WALL/[LP] DEPTH CONTROL DOWN BUTTON.lsl | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 BLOCK-WALL/[LP] DEPTH CONTROL DOWN BUTTON.lsl diff --git a/BLOCK-WALL/[LP] DEPTH CONTROL DOWN BUTTON.lsl b/BLOCK-WALL/[LP] DEPTH CONTROL DOWN BUTTON.lsl new file mode 100644 index 0000000..46bba41 --- /dev/null +++ b/BLOCK-WALL/[LP] DEPTH CONTROL DOWN BUTTON.lsl @@ -0,0 +1,50 @@ +// [LP] BLOCK WALL - DEPTH CONTROL DOWN BUTTON +// JESSYKA RICHARD / JESSICA PIXEL +// LIFTEDPIXEL.NET 2014 8 8 + +vector WHITE = < 1.0, 1.0, 1.0 >; +float SOLID = 1.0; + +integer DChannel = 50; +integer RezChannel = 20; + +integer Depth = 1; +default +{ + state_entry() + { + llListen ( DChannel, "", NULL_KEY, "" ); + llSetText ( (string)Depth, WHITE, SOLID ); + } + + listen ( integer channel, string name, key id, string message ) + { + if ( message == "DUP" ) + { + Depth = Depth + 1; + if ( Depth > 3 ) + { + Depth = 3; + } + llSetText ( (string)Depth, WHITE, SOLID ); + llRegionSay ( RezChannel, "D" + (string)Depth ); + } + + if ( message == "DWHAT" ) + { + llSay ( (DChannel + 1), (string)Depth ); + } + } + + touch_start ( integer num_detected ) + { + Depth = Depth - 1; + if ( Depth < 1 ) + { + Depth = 1; + } + + llSetText ( (string)Depth, WHITE, SOLID ); + llRegionSay ( RezChannel, "D" + (string)Depth ); + } +}