daily pastebin goal
35%
SHARE
TWEET

Untitled

a guest Mar 14th, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. integer numberOfRows    = 32;
  2. integer numberOfColumns = 32;
  3. integer link;
  4. integer face;
  5.   integer columnIndex ;
  6.         integer rowIndex  ;
  7. default
  8. {
  9.     state_entry()
  10.     {
  11.         llSay(0, "Hello, Avatar!");
  12.         llSetLinkColor(LINK_SET,<1,1,1>,ALL_SIDES);
  13.     }
  14.  
  15.     touch_start(integer total_number)
  16.     {
  17.          vector  touchST   = llDetectedTouchST(0);
  18.           columnIndex = (integer) (touchST.y * numberOfColumns);
  19.         rowIndex    = (integer) (touchST.x * numberOfRows);
  20.         integer cellIndex   = (rowIndex * numberOfColumns) + columnIndex;
  21.                             link=cellIndex/8;
  22.                             face=cellIndex-(link*8);
  23.        llSetLinkPrimitiveParamsFast(link+2,[PRIM_COLOR,face,<1,0,0>,1]);
  24.        llSay(0,(string)cellIndex);
  25.     }
  26.     touch(integer numb)
  27.     {
  28.        
  29.         }
  30.     touch_end(integer tots)
  31.     {
  32.          vector  touchST   = llDetectedTouchST(0);
  33.           columnIndex = (integer) (touchST.y * numberOfColumns);
  34.         rowIndex    = (integer) (touchST.x * numberOfRows);
  35.         integer cellIndex   = (rowIndex * numberOfColumns) + columnIndex;
  36.                             link=cellIndex/8;
  37.                             face=cellIndex-(link*8);
  38.                            
  39.         llSetLinkPrimitiveParamsFast(link+2,[PRIM_COLOR,face,<0,1,0>,1]);
  40.         vector pos=llGetPos();
  41.         pos.x=pos.x-7.75;
  42.         pos.y=pos.y-7.75;
  43.         pos.x=pos.x+(rowIndex*.5);
  44.         pos.y=pos.y+(columnIndex*.5);
  45.         pos.z=pos.z+.25;
  46.        // llRezAtRoot(llGetInventoryName(INVENTORY_OBJECT,0),pos,<0,0,0>,ZERO_ROTATION,1);
  47.        
  48.     }
  49. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top