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
Building ScaleByFactor  

ScaleByFactor

Touching this script causes the object to double or halve in size.

Category: Building
By : Anonymous
Created: 2014-02-07 Edited: 2014-02-07
Worlds: Second Life

the Zip file

Download all files for ScaleByFactor
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Script.lsl
1 // From the Second Life Wiki.
2 // Copyright © 2009 Linden Research, Inc. Licensed under Creative Commons Attribution-Share Alike 3.0
3 // Touching this script causes the object to double or halve in size.
4
5 integer growing;
6
7 default
8 {
10 {
11 llSay(PUBLIC_CHANNEL, "Touch to toggle scale.");
12 }
13
14 touch_start(integer num_detected)
15 {
16 growing = !growing;
17
18 float min_factor = llGetMinScaleFactor();
19 float max_factor = llGetMaxScaleFactor();
20
21 llSay(PUBLIC_CHANNEL, "min_scale_factor = " + (string)min_factor
22 + "\nmax_scale_factor = " + (string)max_factor);
23
24 integer success;
25
26 if(growing) success = llScaleByFactor(2.0);
27 else success = llScaleByFactor(0.5);
28
29 if(!success) llSay(PUBLIC_CHANNEL, "Scaling failed!");
30 }
31 }

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