Jump to content

Search the Community

Showing results for tags 'texture changer'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • People Forum
    • Your Avatar
    • Make Friends
    • Lifestyles and Relationships
    • Role Play
    • General Discussion Forum
    • Forums Feedback
    • Missed Connections
    • Second Life Education
  • Places and Events Forum
    • Favorite Destinations
    • Upcoming Events and Activities
    • Games in Second Life
  • Official Contests & Events
    • Leap Into Love Snapshot Contest
  • Creation Forum
    • Fashion
    • Art, Music and Photography
    • Animation Forum
    • Bakes on Mesh
    • Environmental Enhancement Project
    • Machinima Forum
    • Building and Texturing Forum
    • Mesh
    • LSL Scripting
    • LSL Library
    • Experience Tools Forum
    • Sansar for Second Life Residents
  • Technology Forum
    • Second Life Server
    • Second Life Viewer
    • Second Life Web
    • General Second Life Tech Discussion
  • Commerce Forum
    • Merchants
    • Inworld Employment
    • Wanted
  • Land Forum
    • General Discussion
    • Mainland
    • Linden Homes
    • Regions for Sale: Full Private Island
    • Region for Rent: Full Private Island
    • Regions for Sale: Homesteads
    • Region Rentals: Homestead
    • Parcels for Sale: Mainland
    • Parcels for Rent: Mainland
    • Wanted: Full Private Island
    • Wanted: Homesteads
    • Wanted: Mainland
  • International Forum
    • Deutsches Forum
    • Foro en español
    • Forum in italiano
    • Forum français
    • 日本語フォーラム
    • 한국어 포럼
    • Fórum em português
    • Forum polskie
    • المنتدى العربي
    • Türkçe Forum
    • Форум по-русски
  • Adult Content Forum
    • Highlight Upcoming Events
    • General Discussion
    • General Announcements
  • Answers
    • Abuse and Griefing
    • Account
    • Avatar
    • Creation
    • Inventory
    • Getting Started
    • Controls
    • Land
    • Linden Dollars (L$)
    • Shopping
    • Technical
    • Viewers
    • Everything Else
    • International Answers

Blogs

  • Commerce
  • Featured News
  • Inworld
  • Tools and Technology
  • Tips and Tricks
  • Land

Categories

  • English
  • Deutsch
  • Français
  • Español
  • Português
  • 日本語
  • Italiano
  • Pусский
  • Türkçe

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me

Found 3 results

  1. I have an open source texture change hud for my mesh dress with ruffles. The HUD script textures the whole dress one color. Question: Can I change the script to use several textures at one time to color multiple faces of this dress? Or am I to understand that only one texture for any button Script in the HUD can be used on a mesh dress with multiple faces? Example: I would like to wear the HUD and click the button on the HUD and the dress be solid color and the ruffles be another color. Here is the script I am using for the HUD button (NOTE: I have a relay in the dress): integer channel = -1000001; // Channel for comms (Must be same as reciever). string texture = "9e354a68-c7b6-75b6-39d2-83f345c33b51"; // UUID of Texture to apply integer link = LINK_SET; // Link number to apply the texture to (LINK_SET for all links). integer face = ALL_SIDES; // Face number to apply the texture to (ALL_SIDES for all faces). string SR = "*"; // Seperator to use in the list, must be the same // as the seperator to be used within the reviever // script. Here is the picture of my dress I would like to be able to change the ruffles/neckline only with the button click. Or be able to change the dress color one color and the ruffles another. https://gyazo.com/69e1f0163c69633841e667022791983b thank you for any help, I am not a pro, just someone who loves playing second life and making things.
  2. Hello, i'm almost done with my hud i have one more feature to add before i can make it communicate between the actual meshes. I'm not sure how i would explain this so it's understandable so here's a little gif to explain: - Click The way it's constructed for me is the following: the HUD would send that output to the mesh and tell on which face to change which texture to (more specific the texture + offset). This could be 1, 3, all etc. On the left example of the mesh the 2 parts would be on top of each other instead of next to eachother. A full_perm copy of the hud working in-game could be given for a live representation of what it does already, just send me a IM some more images to understand: The code: // Name: HUD Script // Category: Modular Road kit // Author: Chris Parker // Created: 18-08-2017 // Setup for the texture changer integer numberOfColumns = 3; integer numberOfRows = 5; // Channel Setup integer channel = -50502; // Toggle integer gOn; // Rotating unused elements vector rotated = <0, -90, 0>; rotation rOn = ZERO_ROTATION; rotation rOff; // Textures key kTitleTex = "a1805d46-f48e-c4fd-648e-c00d608d1604"; key kWetRoadBtn = "a83fcd2c-4df2-8e8a-3edd-03ba8b0b7a7b"; key kRoadMarkingsBtn = "3a7c7475-21f0-31f4-4da7-d094c819c6c3"; key kRoadTexturesBtn = "b97dc6ac-e2be-403b-f6ed-558eb4c11932"; key kRoadLinesBtn = "2677b56d-ecc5-67c0-1a57-9f69c69bf158"; vector vTabRepeats = <0.5, 1.0, 0.0>; vector vTabOn = <-0.25, 0, 0>; vector vTabOff = <0.25, 0, 0>; // Linknumbers integer giTitle; integer giTabs; integer giDryRoad; integer giDisplay_1; integer giMarksDisplay; integer giLinesDisplay; integer giNext; integer giPrev; integer giClear; // Current Tab list glTabs = [0,0,"Wet Road", "Road Markings", "Road Textures", "Road Lines"]; integer giCurrTab = 2; integer giSelectedTextureNum; // Sorting list glSortNum = ["13","14","15","10","11","12","7","8","9","4","5","6","1","2","3"]; list glSortNum2 = ["28","29","30","25","26","27","22","23","24","19","20","21","16","17","18"]; list glSortNum3 = ["43","44","45","40","41","42","37","38","39","34","35","36","31","32","33"]; // Texture List list glWetRoad = ["Wet 1", "Wet 2", "Wet 3"]; list glRoadMarkings = ["Decal 1", "Decal 2", "Decal 3", "Decal 4", "Decal 5", "Decal 6", "Decal 7", "Decal 8", "Decal 9", "Decal 10", "Decal 11", "Decal 12", "Decal 13", "Decal 14", "Decal 15", "Decal 16", "Decal 17", "Decal 18", "Decal 19", "Decal 20", "Decal 21", "Decal 22", "Decal 23", "Decal 24", "Decal 25", "Decal 26", "Decal 27", "Decal 28", "Decal 29", "Decal 30", "Decal 31", "Decal 32"]; list glRoadTextures = ["Road 1", "Road 2", "Road 3", "Road 4", "Road 5", "Road 6", "Road 7", "Road 8", "Curb 1", "Curb 2", "Curb 3", "Curb 4"]; list glRoadLines = ["Line 1", "Line 2", "Line 3", "Line 4", "Line 5", "Line 6", "Line 7", "Line 8"]; // Pages list glPages = ["Page 1", "Page 2", "Page 3"]; integer giCurrPage = 1; // Preview selector 8 texture faces max list lPosition = [0,1,2,3,4,5,6,7]; GetLinkNum() { integer iP = llGetNumberOfPrims(); while(iP) { string sName = llGetLinkName(iP); if (sName == "Title") { giTitle = iP; } else if (llGetSubString(sName, 0,7) == "Mesh_HUD") { giTabs = iP; } else if (sName == "Dry Road") { giDryRoad= iP; } else if (sName == "Display 1") { giDisplay_1 = iP; } else if (sName == "Marks Display") { giMarksDisplay= iP; } else if (sName == "Lines Display") { giLinesDisplay = iP; } else if (sName == "Next") { giNext = iP; } else if (sName == "Prev") { giPrev = iP; } else if (sName == "Clear") { giClear= iP; } --iP; } } integer TextureSelection(vector _st) { // ZERO_VECTOR (<0.0, 0.0, 0.0> ... the origin) is in the bottom left corner of the face // touchST.x goes across the face from the left to the right // touchST.y goes up the face from the bottom to the top integer columnIndex = (integer) (_st.x * numberOfColumns); integer rowIndex = (integer) (_st.y * numberOfRows); integer cellIndex = (rowIndex * numberOfColumns) + columnIndex; if (giCurrPage == 2) { return llList2Integer(glSortNum2, cellIndex); } else if (giCurrPage == 3) { return llList2Integer(glSortNum3, cellIndex); } else { return llList2Integer(glSortNum, cellIndex); } } default { state_entry() { GetLinkNum(); llSetText(llGetObjectName(), <1.0, 1.0, 1.0>, 1.0 ); rotated *= DEG_TO_RAD; rOff = llEuler2Rot(rotated); } touch_start(integer num_detected) { gOn = !gOn; integer iLinkNum = llDetectedLinkNumber(0); string sLinkName = llGetLinkName(iLinkNum); integer iTouchFace = llDetectedTouchFace(0); vector vTouchST = llDetectedTouchST(0); if (sLinkName == "Display 1") { string sCurrentTab = llList2String(glTabs, giCurrTab); giSelectedTextureNum = TextureSelection(vTouchST); //llOwnerSay("Texture # " + (string)giSelectedTextureNum + " has been clicked in tab " + llList2String(glTabs, giCurrTab)); if (sCurrentTab == "Wet Road") { llOwnerSay("This Texture has been seleted: " + llList2String(glWetRoad, giSelectedTextureNum -1)); } else if (sCurrentTab == "Road Markings") { llOwnerSay("This Texture has been seleted: " + llList2String(glRoadMarkings, giSelectedTextureNum -1)); } else if (sCurrentTab == "Road Textures") { llOwnerSay("This Texture has been seleted: " + llList2String(glRoadTextures, giSelectedTextureNum -1)); } else if (sCurrentTab == "Road Lines") { llOwnerSay("This Texture has been seleted: " + llList2String(glRoadLines, giSelectedTextureNum -1)); } } // If "Prev" button is pressed if (sLinkName == "Prev") { if (giCurrPage > 1) { giCurrPage--; llOwnerSay("Current page: " +(string)giCurrPage); } } // If "Next" button is pressed if (sLinkName == "Next") { if (giCurrPage < 3) { giCurrPage++; llOwnerSay("Current page: " +(string)giCurrPage); } } // If "Clear" button is pressed if (sLinkName == "Clear") { if (giCurrTab == 3) { llOwnerSay("Clear Decals"); } else if (giCurrTab == 4) { llOwnerSay("Clear Road"); } else if (giCurrTab == 5) { llOwnerSay("Clear Lines"); } } // Reset road back to dry if(sLinkName == "Dry Road") { if (giCurrTab == 2) { llOwnerSay("Dry Road"); } } // Toggle rain Animation if(sLinkName == "Animated") { if (giCurrTab == 2) { if (gOn) { llOwnerSay("Animate"); llSetLinkPrimitiveParamsFast(10, [ PRIM_TEXTURE, ALL_SIDES, "cecbcc14-cc70-9f60-3486-fec8f9de3e4e", <1.0, 0.5, 0.0>, <0.0, -0.25, 0.0>, 0.0 ]); } else if (!gOn) { llOwnerSay("!Animate"); llSetLinkPrimitiveParamsFast(10, [ PRIM_TEXTURE, ALL_SIDES, "cecbcc14-cc70-9f60-3486-fec8f9de3e4e", <1.0, 0.5, 0.0>, <0.0, 0.25, 0.0>, 0.0 ]); } } } if (giCurrTab == 3) { //Page texture switching if (iLinkNum == 6 | iLinkNum == 4) { if (giCurrPage == 1) { llSetLinkTexture(3, "452e4d7a-405c-d530-f2e9-39af7584bc2a", ALL_SIDES); llOwnerSay("Page 1 texture applied"); } else if (giCurrPage == 2) { llSetLinkTexture(3, "d851c87b-ee5d-5f2f-7929-95714f20a367", ALL_SIDES); llOwnerSay("Page 2 texture applied"); } else if (giCurrPage == 3) { llSetLinkTexture(3, "5533a062-2b74-1086-0e9d-d95a196c1442", ALL_SIDES); llOwnerSay("Page 3 texture applied"); } } } // If tab menu is clicked if(iLinkNum == 1) { // Delete Button if(iTouchFace == 0) { llOwnerSay("DeleteHUD"); } // Minimize Button if(iTouchFace == 1) { llOwnerSay("DetachHUD"); } // Wet Road Button if(iTouchFace == 2) { giCurrTab = 2; giCurrPage = 1; // Title offset llSetLinkPrimitiveParamsFast(2, [ PRIM_TEXTURE, 1, kTitleTex, <1.0, 0.25, 0.0>, <0.0, 0.375, 0.0>, 0.0 ]); // wet road offset llSetLinkPrimitiveParamsFast(1, [ PRIM_TEXTURE, 2, kWetRoadBtn, vTabRepeats, vTabOn, 0.0 ]); // all others offset back llSetLinkPrimitiveParamsFast(1, [ PRIM_TEXTURE, 3, kRoadMarkingsBtn, vTabRepeats, vTabOff, 0.0 ]); llSetLinkPrimitiveParamsFast(1, [ PRIM_TEXTURE, 4, kRoadTexturesBtn, vTabRepeats, vTabOff, 0.0 ]); llSetLinkPrimitiveParamsFast(1, [ PRIM_TEXTURE, 5, kRoadLinesBtn, vTabRepeats, vTabOff, 0.0 ]); // Rotate Road lines Previewer = OFF llSetLinkPrimitiveParamsFast(9, [PRIM_ROT_LOCAL, rOff]); // Rotate Road markings Previewer = OFF llSetLinkPrimitiveParamsFast(8, [PRIM_ROT_LOCAL, rOff]); // Rotate Dry road button = ON llSetLinkPrimitiveParamsFast(7, [PRIM_ROT_LOCAL, rOn]); llSetLinkPrimitiveParamsFast(10, [PRIM_ROT_LOCAL, rOn]); // Rotate page buttons = OFF llSetLinkPrimitiveParamsFast(6, [PRIM_ROT_LOCAL, rOff]); llSetLinkPrimitiveParamsFast(5, [PRIM_ROT_LOCAL, rOff]); llSetLinkPrimitiveParamsFast(4, [PRIM_ROT_LOCAL, rOff]); //Set Display 01 background texture llSetLinkPrimitiveParamsFast(3, [ PRIM_TEXTURE, ALL_SIDES, "b9437edd-c3e0-afe7-1b63-ea56893f723a", <1.0, 1.0, 0.0>, <0.0, 0.0, 0.0>, 0.0 ]); } // Road Markings Button if(iTouchFace == 3) { giCurrTab = 3; giCurrPage = 1; // Title offset llSetLinkPrimitiveParamsFast(2, [ PRIM_TEXTURE, 1, kTitleTex, <1.0, 0.25, 0.0>, <0.0, 0.125, 0.0>, 0.0 ]); // road markings offset llSetLinkPrimitiveParamsFast(1, [ PRIM_TEXTURE, 3, kRoadMarkingsBtn, vTabRepeats, vTabOn, 0.0 ]); // all others offset back llSetLinkPrimitiveParamsFast(1, [ PRIM_TEXTURE, 2, kWetRoadBtn, vTabRepeats, vTabOff, 0.0 ]); llSetLinkPrimitiveParamsFast(1, [ PRIM_TEXTURE, 4, kRoadTexturesBtn, vTabRepeats, vTabOff, 0.0 ]); llSetLinkPrimitiveParamsFast(1, [ PRIM_TEXTURE, 5, kRoadLinesBtn, vTabRepeats, vTabOff, 0.0 ]); // Rotate Road lines Previewer = OFF llSetLinkPrimitiveParamsFast(9, [PRIM_ROT_LOCAL, rOff]); // Rotate Road markings Previewer = ON llSetLinkPrimitiveParamsFast(8, [PRIM_ROT_LOCAL, rOn]); // Rotate Dry road button = OFF llSetLinkPrimitiveParamsFast(7, [PRIM_ROT_LOCAL, rOff]); llSetLinkPrimitiveParamsFast(10, [PRIM_ROT_LOCAL, rOff]); // Rotate page buttons = ON llSetLinkPrimitiveParamsFast(6, [PRIM_ROT_LOCAL, rOn]); llSetLinkPrimitiveParamsFast(5, [PRIM_ROT_LOCAL, rOn]); llSetLinkPrimitiveParamsFast(4, [PRIM_ROT_LOCAL, rOn]); llSetLinkTexture(3, "452e4d7a-405c-d530-f2e9-39af7584bc2a", ALL_SIDES); llOwnerSay("Default page texture applied"); } // Road Textures Button if(iTouchFace == 4) { giCurrTab = 4; giCurrPage = 1; // Title offset llSetLinkPrimitiveParamsFast(2, [ PRIM_TEXTURE, 1, kTitleTex, <1.0, 0.25, 0.0>, <0.0, -0.125, 0.0>, 0.0 ]); // road textures offset llSetLinkPrimitiveParamsFast(1, [ PRIM_TEXTURE, 4, kRoadTexturesBtn, vTabRepeats, vTabOn, 0.0 ]); // all others offset back llSetLinkPrimitiveParamsFast(1, [ PRIM_TEXTURE, 3, kRoadMarkingsBtn, vTabRepeats, vTabOff, 0.0 ]); llSetLinkPrimitiveParamsFast(1, [ PRIM_TEXTURE, 2, kWetRoadBtn, vTabRepeats, vTabOff, 0.0 ]); llSetLinkPrimitiveParamsFast(1, [ PRIM_TEXTURE, 5, kRoadLinesBtn, vTabRepeats, vTabOff, 0.0 ]); // Rotate Road lines Previewer = OFF llSetLinkPrimitiveParamsFast(9, [PRIM_ROT_LOCAL, rOff]); // Rotate Road markings Previewer = OFF llSetLinkPrimitiveParamsFast(8, [PRIM_ROT_LOCAL, rOff]); // Rotate Dry road button = OFF llSetLinkPrimitiveParamsFast(7, [PRIM_ROT_LOCAL, rOff]); llSetLinkPrimitiveParamsFast(10, [PRIM_ROT_LOCAL, rOff]); // Rotate page buttons = OFF llSetLinkPrimitiveParamsFast(6, [PRIM_ROT_LOCAL, rOff]); llSetLinkPrimitiveParamsFast(5, [PRIM_ROT_LOCAL, rOn]); llSetLinkPrimitiveParamsFast(4, [PRIM_ROT_LOCAL, rOff]); //Set Display 01 background texture llSetLinkPrimitiveParamsFast(3, [ PRIM_TEXTURE, ALL_SIDES, "ed943688-013d-c48b-4546-9822e8afd18f", <1.0, 1.0, 0.0>, <0.0, 0.0, 0.0>, 0.0 ]); } // Road Lines Button if(iTouchFace == 5) { giCurrTab = 5; giCurrPage = 1; // Title offset llSetLinkPrimitiveParamsFast(2, [ PRIM_TEXTURE, 1, kTitleTex, <1.0, 0.25, 0.0>, <0.0, -0.375, 0.0>, 0.0 ]); // road lines offset llSetLinkPrimitiveParamsFast(1, [ PRIM_TEXTURE, 5, kRoadLinesBtn, vTabRepeats, vTabOn, 0.0 ]); // all others offset back llSetLinkPrimitiveParamsFast(1, [ PRIM_TEXTURE, 3, kRoadMarkingsBtn, vTabRepeats, vTabOff, 0.0 ]); llSetLinkPrimitiveParamsFast(1, [ PRIM_TEXTURE, 4, kRoadTexturesBtn, vTabRepeats, vTabOff, 0.0 ]); llSetLinkPrimitiveParamsFast(1, [ PRIM_TEXTURE, 2, kWetRoadBtn, vTabRepeats, vTabOff, 0.0 ]); // Rotate Road lines Previewer = ON llSetLinkPrimitiveParamsFast(9, [PRIM_ROT_LOCAL, rOn]); // Rotate Road markings Previewer = OFF llSetLinkPrimitiveParamsFast(8, [PRIM_ROT_LOCAL, rOff]); // Rotate Dry road button = OFF llSetLinkPrimitiveParamsFast(7, [PRIM_ROT_LOCAL, rOff]); llSetLinkPrimitiveParamsFast(10, [PRIM_ROT_LOCAL, rOff]); // Rotate page buttons = OFF llSetLinkPrimitiveParamsFast(6, [PRIM_ROT_LOCAL, rOff]); llSetLinkPrimitiveParamsFast(5, [PRIM_ROT_LOCAL, rOn]); llSetLinkPrimitiveParamsFast(4, [PRIM_ROT_LOCAL, rOff]); //Set Display 01 background texture llSetLinkPrimitiveParamsFast(3, [ PRIM_TEXTURE, ALL_SIDES, "20c83606-4207-3382-ef44-819077616fe0", <1.0, 1.0, 0.0>, <0.0, 0.0, 0.0>, 0.0 ]); } } } } Ofcourse the "return llList2Integer(glSortNum2, cellIndex);" would be changed to llRegionSayTo once i start doing the communiction between the HUD & the Mesh
  3. Hi all, I'm new to scripting and I'm just trying to create more scripts for practice. Right now I am trying to create a script that I can put into a prim, drop a texture, have certain sides change texture and then have the texture and script be deleted from the prim's inventory. The problem I am having is when I call the delete_all_contents() (more specifically, when the texture is deleted) function the faces are reset to default due to the changed() function. I'm assuming because the script is still inside even though it is deleted. Any tips on how I can fix this? Thank you! delete_all_contents() { string thisScript = llGetScriptName(); string inventoryItemName; integer index = llGetInventoryNumber(INVENTORY_ALL); while (index) { --index; // (faster than index--;) inventoryItemName = llGetInventoryName(INVENTORY_ALL, index); llRemoveInventory(thisScript); llRemoveInventory(inventoryItemName); } } default { changed(integer change) { if (change & CHANGED_INVENTORY) { llOwnerSay("The inventory has changed."); string name = llGetInventoryName(INVENTORY_TEXTURE, 0); // transparent texture string trans = "8dcd4a48-2d37-4909-9f78-f7a9eb4ef903"; // Sets all sides transparent, because I want the rim to be transparent llSetTexture(trans, ALL_SIDES); // Sets texture on front and back faces llSetTexture(name, 3); llSetTexture(name, 1); } } touch(integer num_detected){ llOwnerSay("Deleting Scripts..."); delete_all_contents(); } state_entry() { llOwnerSay("Milou's Simple Texture change Prim thingy"); } }
×
×
  • Create New...