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
Avatar Height_Detection  

Height_Detection

Height Detection.lsl

Category: Avatar
By : Francis Chung
Created: 2010-01-10 Edited: 2010-01-10
Worlds: Second Life

the Zip file

Download all files for Height_Detection
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Height_Detection_1.lsl
1
2 //Title: Height Detector
3 //Date:11-16-2003 7:24 PM
4 //Scripter: Francis Chung
5 //ATTENTION GET RID OF THE // IN FRONT OF "DEFAULT" TO ACTIVATE THIS SCRIPT
6
7 //default
8 {
10 {
11 llSetStatus(STATUS_PHANTOM, TRUE);
12 llSetText( "Touch to find out your height", < 1,1,1>, 1 );
13 }
14
15 touch_start(integer total_number)
16 {
17 key avatar;
18 string name;
19 vector size;
20 vector pos;
21 string saeheight = "";
22 float heightfeet;
23
24 avatar = llDetectedKey(0);
25 size = llGetAgentSize( avatar );
26 name = llDetectedName(0);
27 pos = llDetectedPos(0);
28
29 heightfeet = size.z * 3.28083;
30 saeheight = (string)((integer) llFloor(heightfeet)) + " feet ";
31
32 heightfeet -= llFloor(heightfeet);
33 saeheight += (string)((integer)(llRound(heightfeet * 12))) + " inches";
34
35 llSay( 0, name + " is " + (string)size.z + " m (" + saeheight + ") tall. (counting your shoes)" );
36
37 size.x = 0.5;
38 size.y = 0.5;
39 llSetScale( size );
40 // pos.x += 0.5;
41 llSetPos( pos );
42
43 }
44 } // END //

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