Jump to content

MSTRPLN

Resident
  • Content Count

    86
  • Joined

  • Last visited

Posts posted by MSTRPLN


  1. 7 hours ago, Ruthven Willenov said:

    The bag is probably rigged mesh, and linked to the HUD. Try editing the HUD, and the bag will probably highlight with it.

    This is true, the bag is highlighted blue, however i don’t see how it’s attached since it doesnt appear in the inventory of the unpacker. Maybe loaded in by some uuid idk been a while since i’ve been into scripting. Thanks for you comment


  2. How does one create one object/item that will both attach a fully working HUD but also a avatar attachment? (without asking permission e.d.)

    Example:
    downloads.png.eb1e4271c0dd6c73d624d715f1ca7c6c.png

    I've tried "edit" to do some research but i can't seem to select the bag.

    Does anyone know more about this?


  3. Your mesh probably have one layer of polygons that have normals facing outwards, I don't know how to do it in Blender but in 3DS max i either use the "shell" modifier or copy the mesh and flip normals (so i have a copy of both inside & outside facing polygons) This is how most 3D related things work if i remember correctly it's called Backface culling


  4. i tried making a pose but seems like no matter what i do it has some strange behavoir. So i thought why not make it simpler and move only one bone.

    The bone i moved:
     5b5136ac2e26b_downloads(2).png.9e2195eeccfe6aa574dc71c608049efc.png

    When exporting this and uploading to SL it has some strange behavoir.. Even the legs seem to move though i've never touched them.

    468fcc97088e04da423e80dc69da4b89.gif.281a7e661b4a2b3bd9499aad099de6de.gif

    Does anyone know what's going on?


  5. How would one attack this problem on handheld items? Making the hands "grab" something.
    Is this dont by partly-aniamtion where you only override the hand & finger bones? That's my first thought really.

    I've heard someone mention "Bento hands" would this be different or same technique?


  6. Exactly, the road is rougher than the water, therefore a softer reflection.

    After long time (and i really mean a long time) experimenting and tweaking to get things looking slightly better (currently using the default night) i managed to get this result:Example.thumb.png.eb313e3ab07827d0dd652c3662636365.png 

    Wet settings:
    Glossiness: 255
    Environment: 100


    Dry Settings:
    Glossiness: 100
    Environment: 100

    • Like 3

  7. Welll okay let me explain. I used to have the puddles on a seperate layer but that didn't look as good as this one (example)
    The one i have now is using the road's normal &specular. The reason for the Specular alpha (enviromental) i that else, without lights there would be no water visable.
    i fixed it with setting enviironmental to 100.

    as for the glossiness, have the setting at max (255) however, colors in the normal map alpha are set to water (255) and road (100).
    The way the sky was reflecting on the water did it make look weird, using different sky presets fixed it somehow. However, 255 was too extreme so 100 looks more acceptable.
    Or even 50.

    17 hours ago, Klytyna said:

    In fact you don't need alpha channels on any of the 3 maps, set the alpha on the diffuse with the numbered parameter on the texture tab, specular colour should be white, the specular map should be white or pale grey as an average colour, anything darker than an average rgb of 192, just wont look right.
     

    I do, because the glossiness on the road would be softer than on the water, so the normal alpha is essential. Else everything would have the same glossiness, this would kill the feel of materials (IE: sand, metal, stone, wood, water etc) Nothing has the same glossiness/reflectivity etc.

    17 hours ago, Klytyna said:

    Then use a script with setprimparamsfast to slide all three maps in sync with each other for moving ripples, and it should work

     

    The puddles are static, i have however a Layer on top that has a ripple animation:
    b46c8acfb5d722a8aa7ce5228601f2e7.gif.8619c7397fd33261c883c3fa96ca3dd4.gif

     

    10 hours ago, OptimoMaximo said:

    This is totally wrong. depends on the shad model you're working on Blinn and Phong materials REQUIRE black diffuse to define metals, and its color being transferred to the specular color, whereas PBR embeds these 2 parameters in the basecolor texture, defining the metallness using the metalness texture.

    I am familiar with PBR, The black diffuse is usually the case with a Metal/Roughness workflow. Why most cases like SL, Rust use rather Specular/Glossiness (Unless you have a good pbr engine, which SL really doesn't).

     

    Okay one more Question:

    Are normal maps broken? Below is a example of both a Y-Flipped Nromal and a regular one, however on the mesh they look the same.
    Does SL flip on it's own or? it has to be the inverted to show the correct normal. Not sure what's going on here.

    downloads.thumb.png.aa7b88c1cca05e88ff88dc1f5b3e666f.png


  8. Yes i've done the normal's alpha too (the water is 255 glossiness on there), the only proiblem i had was without environment on you wouldn't see a thing of the the water if there wre no lights so yeah. And i've tested it with multiple windlights and sky presets (the one on the right, the fully white meaning 255) and it makes sence, it's reflecting the sky and the default sky isn't that pretty so it look's akward since it only reflects the light and not for example the clouds etc. With darker skies (ie: the default midnight) they look rather dark/black.

    Thank you :)


  9. Sorry i;'ve been away for long time. I think i should've exlained it simpeler. Im not codign the communication just yet.

    For example let's take the road decals, clckking of the first one willl output: "This Texture has been seleted: Decal 1" the second one will do the same but output 2.
    So far it doesnt have any faces to change the texture on. thats what the selector is for (which isnt coded yet).

    Selecting none will result in no changes, selectign one, multiple or all faces on the selector will make the hud change textures on the corresponding faces (as of right now just output text)
    for example: "Faces selected 3 & 5 - Texture selected 1" when having faces 3 and 5 selected and licking on texture 1 (image preview)

    This is what i need help with to make this work


  10. 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:
    HUD.thumb.png.54cd83421a387bd02e852635f0070746.png

    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:
    Screenshot_2.png.c55f8b0cbedc5f3df24edb523f1dfedb.pngScreenshot_3.png.b8c120b72be93eca5ae22eeca8b9a646.pngScreenshot_4.thumb.png.ff3415592b1d63c89f5b230479998421.pngScreenshot_5.thumb.png.fe3bf6b6d42205d6928718af033a0a15.png

    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


  11. 1 hour ago, arton Rotaru said:

    Making it work flawlessly, it is a rather advanced task indeed. Although the functions being used are rather basic. But that's easy to say if you have done this kind of stuff a couple of times already.

    The good thing is, the possibilities are countless. Being creative to how to solve one problem after the other is the fun part of scripting.

    true with a bit of knowledge on hwo stuff works though, because sometimes you look at the wiki but think "okay i understand this demo, but how would i implement it in my situation?

    i think im going with the DetectedTouchST (different outcomes on different tabs for example: when the decals tab is clicked clicking the touchst 1 will change the texture to tex1 of the decals etc.. and have the 3 extra buttons rotate 90 when not used, and the previewer like i said this would be basic but would work i suppose


  12. That might be a bit too advanced for me but ill try my best, although not every button is the same, for example the road decals has 2 pages but most of them are using the multiple texture faces so having these as you described up top and a few "extra" buttons shown/hidden by rotating isn't going to be a big problem i suppose

    as for the previewer, it's workign the same as this the only difference is it won't be 2 cubes but 2 meshes with different faces to controll what part on the mesh can be changed

    with the detectedtouchst i could do this which is 1 object:

    Screenshot_1.png

     

    and then put:

    integer numberOfRows    = 5;
    integer numberOfColumns = 2;

    if im not mistaking, and for the extra buttons just make a seperate object. (would be easier to accomplish because im not super familiar with lists and how to call them in later, let alone do all the functions on the list as you described above).


  13. Some questions appeared again:

    I've got the start of the hud done:

    HUD.png

     

    now my first question: how would i show/hide different tabs? (if you could create linksets inside linksets this wouldn't be an issue)
    because these would be the different tabs (more or less):

    tabs.png

    The title is the easiest part. Just 4 instances under each other in one image file, clicking on each tab menu button would change the texture position then.
    You could say put them all over each other (in different X values) but that would bring it up to so many meshes (not sure if this would become an issue. Example shown below)
    tabs2.png

     

    Question 2: previewer with selectable parts:
     

    Preview selectors.png

    I hope this makes sense, the selectors are constructed the same as the mesh (layers) as shown below:

    mesh layer.png

     

    For the selectors i was thinking this (any better ideas?)
    Coding wise let's say selector 1 is linknumber 8 & selector 2 is linknumber 9
    i could do an if statement on the texture changer like: (If linknumber 8 & face 1 (left side) is toggled put texture only to left face on the road mesh)
    using this solution given by arton Rotaru

     

    selectors.png


  14. Hello, i've made a visual example but im not sure how to code this. basically i have 2 main functions that are clueless to me.

    1. Minimizing UI/HUD
    2. Have different "tabs" appear and dissapear when clicked on the buttons (setting transparency or display wouldn't work i think, yes they would be invisible but still interactable with)
    Maybe havign one "Main" hud (the tab buttons) and attaching/detaching different objects based on what button is pressed? But wouldn't that ask for PERMISSION_ATTACH every single time?

    I've got an example of the background working although the resizing has a kind of a "ease out" thing happening and im not sure if this is the right way to do it.

    integer toggle;
    default
    {
        state_entry()
        {
        }
    
        touch_start(integer total_number)
        {
            toggle = !toggle;
            if(llDetectedLinkNumber(0) == 1)
            {
                if(toggle)
                {
                    llSetLinkPrimitiveParamsFast(2, [PRIM_SIZE, <0.5, 0.15, 0.999>]);
                    llSetLinkPrimitiveParamsFast(2, [PRIM_POSITION, <0.0, -0.888, 0.0>]);
                }
                else
                {
                    llSetLinkPrimitiveParamsFast(2, [PRIM_SIZE, <0.5, 0.5, 0.999>]);
                    llSetLinkPrimitiveParamsFast(2, [PRIM_POSITION, <0.0, -0.712, 0.0>]);
                }
            }
        }
    }

    Basically i have a root prim with a linked prim to the right of it (because when attaching to HUD Center the root will be centered and the actual "background" prim would be on the right side) this because the hud is going to be called from a item where you dont have an option "hud center right" so i'd still need to come up with a solution to hide the center cube & stop it from blocking clicks (maybe size it down to almost 0)

    Any help would be much apreciated!

    Pleae note these images are made in Photoshop and are not yet coded, they are a example of what i'm aiming for

    HUD1.png

     

    HUD2.png


  15. 7 hours ago, Innula Zenovka said:

    Rather than using 8 different textures, why not try using one single large texture, divided into 8, and moving it by changing the texture offset?   That way, it loads only once, when the visitor first arrives in the region and sees the road, no matter which part of the texture is displayed at the time.   

    I don't even know why when i thought about that i was thinking "how could i change uv positions like sprites" ut yeah texture offset is how,  thanks!

×
×
  • Create New...