SHARE
TWEET

Untitled

a guest Mar 20th, 2019 198 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.  
  3. integer myChan = 15;
  4. integer myListener;
  5.  
  6.  
  7.  
  8. integer face = ALL_SIDES;
  9.  
  10.  
  11. //MODULE 1, Section 1
  12. list textureNames = ["Tex0", "Tex1", "Tex2", "Tex3", "Tex4", "Tex5", "Tex6", "Tex7", "Tex8", "Tex9", "Tex10", "Tex11"];
  13.  
  14. list textureIDs = [
  15. "3e15e980-35ad-0cc1-8e47-dc8b4c375a49",
  16. "e4c537db-55d2-baac-82c8-f6f68ac1cf1f",
  17. "23f8c18c-0214-040c-d799-038191b0cc73",
  18. "2d774205-3ae8-949f-27b4-c3829fce7631",
  19. "fb5060eb-2a67-26e9-62ed-f7c34691ccef",
  20. "f52148fb-e1e2-73e6-ce88-9aac0caa8e41",
  21. "c8aac05f-4137-bdd9-e8f6-7afc032eab14",
  22. "b905cce1-bb3e-ddda-6173-220906e49318",
  23. "f31216d1-0756-ce80-d0d6-92956b4cb5ed",
  24. "dc7c7f29-195b-34a1-0e0a-17d3f4fbf7f8",
  25. "13c593d0-33d0-037d-7933-f8daf41021b3",
  26. "56b1518d-8a2d-2843-e65a-b201a5d62b2a"];
  27.  
  28. //END MODULE 1, Section 1
  29.  
  30. default
  31. {
  32.     touch_start(integer total_number)
  33.     {
  34.         //if(llDetectedKey(0) == llGetOwner())
  35.         {
  36.             llListenRemove(myListener);
  37.             myListener = llListen(myChan, "", llDetectedKey(0), "");
  38.             llDialog(llDetectedKey(0), "Select an option:", textureNames, myChan);//a list for each module
  39.         }
  40.     }
  41.    
  42.     listen(integer channel, string name, key ID, string msg)
  43.     {
  44.        
  45.         integer textureIndex = llListFindList(textureNames, [msg]);
  46.         llOwnerSay("Texture Index =" + (string)textureIndex);
  47.        
  48.         if( textureIndex != -1)
  49.         {
  50.        
  51.         llOwnerSay("Texture Index =" + (string)textureIndex);
  52.         key textureUUID = llList2Key(textureIDs, textureIndex);
  53.        
  54.         llSetLinkTexture(2, textureUUID, face);
  55.         }
  56.            
  57.         llListenRemove(myListener);
  58.     }
  59. }
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