Advertisement
virexplorer

Prim Face Numbers

Feb 12th, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.   {
  44.       state_entry()
  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)    )
  56.               llResetScript();
  57.       }
  58.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement