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
Prim Face Numbers Put_a_number_on_all_faces_of_a_prim  

Put_a_number_on_all_faces_of_a_prim

Put_a_number_on_all_faces_of_a_prim

Category: Prim Face Numbers
By : Ferd Frederix
Created: 2010-05-01 Edited: 2010-05-01
Worlds: Second Life

the Zip file

Download all files for Put_a_number_on_all_faces_of_a_prim
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Put_a_number_on_all_faces_of_a_prim_1.lsl

This script by Ferd Frederix may be used in any manner, modified, and republished.  Unless specified otherwise, my scripts are always free and open source.  Objects made with these scripts may be sold with no restrictions.  All I ask is that you point others to this location should they ask you about it and to not sell this script, unless it is for $0 L. Please help improve my work by reporting bugs and improvements.

1 display( integer value, integer face )
2 {
3 float cell_width = 0.25; // in this example the width
4 float cell_height = 0.25; // and height are the same
5
6 llSetTexture("9e59ddf7-d7c3-5248-0894-00ce2154ee8e", face );
7 llScaleTexture( cell_width, cell_height, face );
8 if( value == 0 )
9 llOffsetTexture( -1.5 * cell_width, 1.5 * cell_height, face );
10 else if( value == 1 )
11 llOffsetTexture( -0.5 * cell_width, 1.5 * cell_height, face );
12 else if( value == 2 )
13 llOffsetTexture( 0.5 * cell_width, 1.5 * cell_height, face );
14 else if( value == 3 )
15 llOffsetTexture( 1.5 * cell_width, 1.5 * cell_height, face );
16 else if( value == 4 )
17 llOffsetTexture( -1.5 * cell_width, 0.5 * cell_height, face );
18 else if( value == 5 )
19 llOffsetTexture( -0.5 * cell_width, 0.5 * cell_height, face );
20 else if( value == 6 )
21 llOffsetTexture( 0.5 * cell_width, 0.5 * cell_height, face );
22 else if( value == 7 )
23 llOffsetTexture( 1.5 * cell_width, 0.5 * cell_height, face );
24 else if( value == 8 )
25 llOffsetTexture( -1.5 * cell_width, -0.5 * cell_height, face );
26 else if( value == 9 )
27 llOffsetTexture( -0.5 * cell_width, -0.5 * cell_height, face );
28 else if( value == 10 )
29 llOffsetTexture( 0.5 * cell_width, -0.5 * cell_height, face );
30 else if( value == 11 )
31 llOffsetTexture( 1.5 * cell_width, -0.5 * cell_height, face );
32 else if( value == 12 )
33 llOffsetTexture( -1.5 * cell_width, -1.5 * cell_height, face );
34 else if( value == 13 )
35 llOffsetTexture( -0.5 * cell_width, -1.5 * cell_height, face );
36 else if( value == 14 )
37 llOffsetTexture( 0.5 * cell_width, -1.5 * cell_height, face );
38 else if( value == 15 )
39 llOffsetTexture( 1.5 * cell_width, -1.5 * cell_height, face );
40 }
41
42 default
43 {
45 {
46 integer i;
47
48 for ( i = 0; i < llGetNumberOfSides(); i++ )
49 display( i, i );
50 }
51
52 changed( integer changed_flag )
53 {
54 if( (changed_flag == CHANGED_SHAPE) ||
55 (changed_flag == CHANGED_SCALE) )
57 }
58 }

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