Jump to content

Galatheus

Resident
  • Content Count

    28
  • Joined

  • Last visited

Posts posted by Galatheus


  1. Well, I have a furniture with an option to change the texture. The script uses a listen function as it has a remote script and a receive script. The problem is when I rez multiple copies of the same furniture, and I try to change the texture of one of them it changes all the copies as well because they all have the same channel in the script. I only want the object i touched to change and not all of them.

    Receive script looks like this:

    default
    {
        state_entry()
        {
             llListen(123, "", NULL_KEY, "");
        }
    
        listen( integer channel, string name, key id, string message )
        {
            if (llGetOwnerKey(id) != llGetOwner())
            {
                return;
            }     
           
               
            if (message == "tex1")
            {        
               
             llSetTexture("UUID",1);
            }
            if (message == "tex1")
            {
                 
             llSetTexture("UUID",2);
            }
             if (message == "tex1")
            {
                 
             llSetTexture("UUID",3);
             
            } if (message == "tex1")
            {
                 
             llSetTexture("UUID",4);
             
            } if (message == "tex2")
            {
                 
             llSetTexture("UUID",1);
             
             } if (message == "tex2")
            {
                 
             llSetTexture("UUID",2);
            }
            if (message == "tex2")
            {
                 
             llSetTexture("UUID",3);
            }
            if (message == "tex2")
            {
                 
             llSetTexture("UUID",4);
            }
        }
    }

    Button script looks like this

    integer menu_handler;
    integer menu_channel;
    integer channel_control = 123;
    menu(key user,string title,list buttons)
    {
        menu_channel = (integer)(llFrand(99999.0) * -1);
        menu_handler = llListen(menu_channel,"","","");
        llDialog(user,title,buttons,menu_channel);
        llSetTimerEvent(5.0);
    }
    
    default
    {
        state_entry()
        { llSetTouchText("Remote!");
        }
        touch_start(integer t)
        { 
            menu(llDetectedKey(0),"Choose your label",["Brown","White"]);
        }
        timer()
        {
            llSetTimerEvent(0.0);
            llListenRemove(menu_handler);
        }
        listen(integer channel,string name,key id,string message)
        {
            if (channel == menu_channel)
            {
                if(message == "Brown")
                {
                   
             llWhisper(channel_control,"tex1");
                } 
                if(message == "White")
                {
                   
             llWhisper(channel_control,"tex2");
                }
                 
            
    // llSleep(0.50);
     
    // llSetColor(<1,1,1>, ALL_SIDES);
            } 
        }
    }

     


  2. Thanks for all the response, I guess all I can do now is to tell users to turn off their AO first. Not the result I'm looking for. 

    But that said, I saw some functions in the LSL Portal such as llSetAnimationOverride. Can I somehow use this instead to override whatever animation is currently playing on an avatar?


  3. Thank you for your answers, it helped a lot. I am now figuring out little by little certain codes and how to properly use them. Also thanks to the LSL Portal, with all you guys' help I'm able to make the script work.  I still have a long way to go to completely understand LSL codes but yeah thank you!

    • Like 1

  4. Hi again script experts. I have an animation with a priority that seems below (on upload) most AOs on sl. Problem is, this is the only animation I found that I need for this project. I'm stuck.

    When I activate the animation with the script it doesn't play over my AO and I have tried it with different ones. Is there a way to set this anim's priority to 4 with scripting?


  5. thank you for the response. I'm really new to scripting. I started a week ago. So please cut me some slack if my questions are gonna be basic.

    For long term of course I want to learn to script on my own from scratch. And for this particular script I can't seem to lead myself to the right direction. Which tutorials to watch for this specific topic, and what not. So if you guys know the best tutorials I would appreciate their links.

    Now, I get syntax errors whenever I try to solve this. Of course I know this isn't the full script. I just don't know how to set the timer, run time and state entry events to make this touch event function work. As for the short term solution, I don't exactly know what to write to make the strCurrentAnimation a global string and what purpose. Is it to set what animations are gonna be used?

    default
    {
        state_entry()
        {
            llOwnerSay( "Your HUD is ready" );
            llOwnerSay( "Visit.." );
        }
        touch_start(integer detected)
        {
            llTriggerSound(llGetInventoryName(INVENTORY_SOUND,0), 1);
            llRequestPermissions(llDetectedKey(0), PERMISSION_TRIGGER_ANIMATION);
        }
        run_time_permissions(integer perm)
        {
            if (perm & PERMISSION_TRIGGER_ANIMATION)
            {
                llStartAnimation("2");
                llSetTimerEvent(5.0);
            }
        }
        timer()
        {
            llSetTimerEvent(0.0);
            llStopAnimation("2");
        }
    }

    this is what I have so far.


  6. So I baked a shadow texture (the one you put under your objects), it looks good so far I don't even need to edit the transparency in-world, everything is perfect except for one issue. The edges are showing bc, I guess the plane that I use to bake it on the software is too small even though it's pretty much double the size of the actual object. I edit it on PS but it ends up looking horrible.

    Any tips from the Pros?


  7. On 9/24/2019 at 12:57 AM, Chic Aeon said:

    If you bake a CYCLES texture (or the same idea in programs other than Blender)  it includes the AO (or equivilent) in the mix. That is what most of the popular designers do.  You would adjust how prominent  the AO  appears by the lighting set up. So likely you are using another method?  Another way to "bump up" the ambient would simply be to adjust the CONTRAST in a graphics program.  Maybe some screenshot examples would help readers understand exactly what you are asking. 

    oh you mean use the AO map in the material or turn on Ambient occlusion in the settings?


  8. On 9/23/2019 at 10:53 AM, ChinRey said:

    I think you answered in your first sentence. If they make the thing look better, use them, if not, don't. ;)

    Ambient occlusion will never look natural because it doesn't exist in real life. In RL they use something called the Fresnel effect instead and that's exactly the opposite - things tend to look lighter, not darker towards the edges.

    Sometimes you need a bit of accentuation to bring out the shape of the object though and besides, AO is necessary to give that lovely "hand drawn" feel that is so popular in SL.

    Thanks for the response      I do like AO it's just that they don't blend with my bakes sometimes, and with that I skip it but the problem is because I used AO in my previous stuff and then I look at them both, they look like they're not made by one person 😕


  9. 21 hours ago, OptimoMaximo said:

    The uv map squashes the texture in my opinion. The UV map was probably made without applying scale prior to unwrap. Try applying scale first and unwrap again, if its proportions change, that's the issue

    oh yeah, that's it     that did the job lol      thank you so much

    now the problem with the new UV map is that the texture on 512x512 is so bad

×
×
  • Create New...