Advertisement
Edie_Shoreland

Directions for Texture Send, Receiver, and HUD scripts

Apr 15th, 2019
278
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.07 KB | None | 0 0
  1. The basics for how these scripts work is this: One script (the Texture Find and Send script) gives you the LSL information and list values (as llSetLinkPrimitiveParams commands) for recreating the textures for a linkset. That information is sent to chat, and copied and pasted as user defined functions (with timestamp and header information deleted) into another script (the Texture Receiver script). The third script (the HUD button script) is placed into an 8 face panel prim that communicates with the Texture Receiver script, and lets you change the textures of your object by pressing buttons on a HUD.
  2.  
  3. 1. Rez a test object: This will be the object that you'll make your texture changes on and make your adjustments. If it's a fitted or rigged item, don't wear it. If it's a clothing item, think of it as your mannequin. IF YOU'RE ADDING A "CREATOR PRIM" TO A FULL PERM RIGGED CLOTHING ITEM, MAKE SURE YOU USE AN EXACT COPY OF THE LINK SET FOR BOTH THE TEST OBJECT AND THE FINAL PRODUCT.
  4.  
  5. 2. Copy and paste the "Texture Receiver Script (goes in final product)" into a new script. Keep that in your inventory (for now).
  6.  
  7. 3. Copy and paste the "Texture Find & Send Script" into a new script. Name the script something that indicates that it's sending information, the script does not change textures or colors. This script's purpose is to send the texture and color information in chat so you can paste it into a different script later. (Don't put the notecard "Texture Find & Send Script (goes in test item) into your test object...it will do absolutely nothing.)
  8.  
  9. 4. Put the script into your test object. You'll probably get a message in your Nearby Chat window with a lot of code and numbers. Those messages contain the current texture information for your test object.
  10.  
  11. 5. Texture your test object for your first selection. When you're done, and you like how it's been textured and colored, touch the test object. You will get another batch of messages (between 1 and 3 per linked prim. For a linkset, you'll see a lot more.) sent to the Nearby Chat window. Look at the Timestamp. You'll only want to cut and paste the messages sent for your most recent "touch".
  12.  
  13. 5a. The information you cut and paste from your Nearby Chat window messages should look something like this:
  14.  
  15. [03:46] Test Aria Miniskirt XS (full perm): llSetPrimitiveParams([PRIM_TEXTURE, 0, "5748decc-f629-461c-9a36-a35a221fe21f", <1.000000, 1.000000, 0.000000>, <0.000000, 0.000000, 0.000000>, 0.000000, PRIM_TEXTURE, 1, "26e39de6-7a8f-f425-27fc-c88c4522b817", <1.000000, 1.000000, 0.000000>, <0.000000, 0.000000, 0.000000>, 0.000000, PRIM_TEXTURE, 2, "dd88438d-895e-4cc4-3557-f8b6870be6e5", <1.000000, 1.000000, 0.000000>, <0.000000, 0.000000, 0.000000>, 0.000000, PRIM_TEXTURE, 3, "0ec4ca9d-e63e-30ce-b166-6d61e4184a1f", <1.000000, 1.000000, 0.000000>, <0.000000, 0.000000, 0.000000>, 0.000000] );
  16. [03:46] Test Aria Miniskirt XS (full perm): llSetPrimitiveParams([PRIM_TEXTURE, 4, "e00b6ea4-7a3b-b6fc-e8b7-107e2be6e301", <1.000000, 1.000000, 0.000000>, <0.000000, 0.000000, 0.000000>, 0.000000, PRIM_TEXTURE, 5, "89556747-24cb-43ed-920b-47caed15465f", <1.000000, 1.000000, 0.000000>, <0.000000, 0.000000, 0.000000>, 0.000000, PRIM_TEXTURE, 6, "fd459ac9-536b-a563-a12d-d0e9053f9e84", <1.000000, 1.000000, 0.000000>, <0.000000, 0.000000, 0.000000>, 0.000000, PRIM_TEXTURE, 7, "98a1f0ff-26b3-9374-6efc-76108b39ddf6", <1.000000, 1.000000, 0.000000>, <0.000000, 0.000000, 0.000000>, 0.000000] );
  17.  
  18. 6. Open your "Texture Receiver Script (Goes in final product)" script. You'll be pasting the information you get in Nearby Chat to use with the HUD later.
  19.  
  20. 7. Copy and paste the messages (from the test object) you see in chat inside the curly braces {} for the fZero () function. Make sure the message has a left curly brace { directly above it, and a right curly brace } directly below it. You can delete the "//Paste texture data here" part. DON'T PASTE IT BETWEEN THE PARENTHESIS () or it won't work and you'll get an error when you try to save it.
  21.  
  22. 8. Delete the timestamps and sender information from the messages (the "[18:38] Test Object:" part, or whatever name the object has), you pasted into your Receiver script. Delete the colon (don't delete any semi-colons, as they are part of the code), and everything preceding it. The remainder of the message is scripting code to reproduce the texturing and coloring of the test object.
  23.  
  24. 8a. Your first user function should look something like this:
  25.  
  26. fZero()
  27. {
  28. llSetPrimitiveParams([PRIM_TEXTURE, 0, "5748decc-f629-461c-9a36-a35a221fe21f", <1.000000, 1.000000, 0.000000>, <0.000000, 0.000000, 0.000000>, 0.000000, PRIM_TEXTURE, 1, "26e39de6-7a8f-f425-27fc-c88c4522b817", <1.000000, 1.000000, 0.000000>, <0.000000, 0.000000, 0.000000>, 0.000000, PRIM_TEXTURE, 2, "dd88438d-895e-4cc4-3557-f8b6870be6e5", <1.000000, 1.000000, 0.000000>, <0.000000, 0.000000, 0.000000>, 0.000000, PRIM_TEXTURE, 3, "0ec4ca9d-e63e-30ce-b166-6d61e4184a1f", <1.000000, 1.000000, 0.000000>, <0.000000, 0.000000, 0.000000>, 0.000000] );
  29. llSetPrimitiveParams([PRIM_TEXTURE, 4, "e00b6ea4-7a3b-b6fc-e8b7-107e2be6e301", <1.000000, 1.000000, 0.000000>, <0.000000, 0.000000, 0.000000>, 0.000000, PRIM_TEXTURE, 5, "89556747-24cb-43ed-920b-47caed15465f", <1.000000, 1.000000, 0.000000>, <0.000000, 0.000000, 0.000000>, 0.000000, PRIM_TEXTURE, 6, "fd459ac9-536b-a563-a12d-d0e9053f9e84", <1.000000, 1.000000, 0.000000>, <0.000000, 0.000000, 0.000000>, 0.000000, PRIM_TEXTURE, 7, "98a1f0ff-26b3-9374-6efc-76108b39ddf6", <1.000000, 1.000000, 0.000000>, <0.000000, 0.000000, 0.000000>, 0.000000] );
  30. }
  31.  
  32. 9. Save your "Texture Receiver Script" and make sure you don't get any errors. If you don't, hopefully the first texture for your texturing HUD has been saved.
  33.  
  34. 10. Change up the textures and colors on your test object and click the test object again. You'll see messages containing the new texture information in Nearby Chat, and you'll want to select those (make sure they're the most recent) and paste those into your "Texture Receiver Script" between the curly braces {} of the fOne function. Delete the chat headers (everything before the colon). Save the Receiver script and make sure you don't get any error messages.
  35.  
  36. 11. Repeat until you've saved information for all texture changes you want to include with your object (up to 8 texture changes... or the fSeven() function) in the Receiver script.
  37.  
  38. 12. Rez another copy of the object you used as your test object. Place the Texture Receiver Script you saved with the texture information messages from chat into the newly rezzed object. This will be the object your HUD communicates with.
  39.  
  40. 13. Wear the HUD button prim, and edit it. You'll want to go to the contents tab, and click the "New Script" button. Double click the new script. Copy and paste the script information from "Texture Change HUD Script" into the new script. Save it, and close the edit window.
  41.  
  42. 14. Press one of the buttons. If everything's been done correctly. Button 0 will texture your second object with the same textures and colors you pasted into fZero(), Button 1 will give you what you pasted into fOne(), and so on.
  43.  
  44. 15. As long as the Texture Change HUD Script is in the button object, it can be linked to a prim you create and texture with your logo. You can change the images for each of the buttons, or make the buttons you don't use completely transparent for your final HUD.
  45.  
  46. 16. If you're unsure about your ability to edit scripts, or have problems, ask a friend or someone more familiar with scripts for help. The scripts in these notecards can be found online at https://pastebin.com/Sv2WvnRH , https://pastebin.com/YtHXGzSr , and https://pastebin.com/Qy1viaCk . Give the person helping you these links or a copy of the notecards. The default setting for the Find & Send Script is set up so someone within a 20 meter radius can read the information in chat, and offer help or advice on how to get that information into your Receiver script.
  47.  
  48. 17. When you're ready to sell or gift your final product, set your Reciever and HUD button scripts to no-modify. This protects your work, and prevents others from stealing your texture information.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement