Jump to content

Rachel1206

Resident
  • Posts

    743
  • Joined

  • Last visited

Posts posted by Rachel1206

  1. You do not have a handle to the listening. Try to add this:

    integer nHandle;

    in your state_entry()

     nHandle = llListen(ch, "", NULL_KEY, "");

    Now listening is a resource and should be limited in its use, so having different buttons with their own unique channel is a little overkill, I would advice against. Instead use the message you send from the button to tell the outfit, what should be changed, for example: 1 = top 2 = skirt 3 = boots

    llSay( ch, "1,6de65ebe-5fef-7f52-dd05-da49df98833c");

    Now your clothing should be something like this:

    integer ch=46879421563;
    integer nHandle;
    integer FACE= ALL_SIDES;

    default
    {
         state_entry()
        {
           nHandle= llListen(ch,"",NULL_KEY,"");
        }

       listen(integer channel, string name, key id, string msg)
       {
            if (llGetOwner() != llGetOwnerKey(id)) return;
                   
            integer nAction= (integer) llGetSubString(msg,0,1);
            if (nAction==1)
            {
                string strTexture=  llGetSubString(msg,2,-1);
        
                llSetTexture( strTexture, FACE);
            }
        }
    }

     

    • Like 3
  2. 8 hours ago, Lexii Lane said:

        llSetPrimitiveParams([

            PRIM_POINT_LIGHT, light_s, lightcolor, intensity, radius, falloff,
            PRIM_FULLBRIGHT, ALL_SIDES, light_s,
            PRIM_GLOW, ALL_SIDES, thisglow
        ]);
          llSetColor(lightcolor, ALL_SIDES);

    That script is allowing the prim to go fullbright, and turning on the lightsource for the prim it is in. Figuring out how to disable the fullbright, and broadcast that to a child script in the rest of the prims is where I am at :\

    Replace my code above with this in the child, remember to add the gloabl variables lightcolor, intensity etc.

      link_message(integer sender_num, integer num, string message, key id)
      {
            light_s= (integer) message;
            if (light_s==TRUE)
                thisglow= 0.1;
            else
                thisglow= 0.0;

            llSetPrimitiveParams([
               PRIM_POINT_LIGHT, light_s, lightcolor, intensity, radius, falloff,
               PRIM_FULLBRIGHT, ALL_SIDES, light_s,
              PRIM_GLOW, ALL_SIDES, thisglow
           ]);
    }

    Do the same in MOTHER.LSL in the function light()

    See also the Viki on PRIM_POINT_LIGHT for an example turning on/off  PRIM_FULLBRIGHT combined with PRIM_POINT_LIGHT

     

  3. For a link set do as below - and yes mother blinks along ;) - to stop mummy blinking  >:( - out comment light(bFlash );: in the timer()

     

    MOTHER.LSL

    //      Simple link set light controller
    //      Place this script MOTHER in object controlling
    //      If it works, it was made by me :D

    integer bSwitch= FALSE;
    integer bFlash= FALSE;
    float fTimerPeriod= 0.333;
    float fGlow;

    light( integer nState )
    {
        if (nState==TRUE)
            fGlow= 0.6;
        else
            fGlow= 0.0;
            
          llSetPrimitiveParams ([PRIM_GLOW, ALL_SIDES, nState, PRIM_GLOW, ALL_SIDES, fGlow]);
    }

    default
    {
        state_entry()
        {
        }
        
        touch_start(integer total_number)
        {
            bSwitch= !bSwitch;
            if (bSwitch==TRUE)
            {
                llSetTimerEvent( fTimerPeriod );
            }
            else
            {
                llSetTimerEvent( 0.0 );
                bFlash= FALSE;
                light( bFlash);            
                llMessageLinked(LINK_ALL_OTHERS, 0, (string)bFlash, "");
            }
        }
        
        timer()
        {
            bFlash= !bFlash;
            llMessageLinked(LINK_ALL_OTHERS, 0, (string)bFlash, "");
            light(bFlash );
        }
    }

    //  End MOTHER light controller

    CHILD.LSL

     //      Simple link set light controller
    //      
    //      Place this script CHILD in the other objects
    //
    //      If it works, it was made by me :D
    //

    integer nState= FALSE;
    float fGlow;

    default
    {
        state_entry()
        {
        }
        
        link_message(integer sender_num, integer num, string message, key id)
        {
            nState= (integer) message;
            if (nState==TRUE)
                fGlow= 0.6;
            else
                fGlow= 0.0;
            llSetPrimitiveParams ([PRIM_GLOW, ALL_SIDES, nState, PRIM_GLOW, ALL_SIDES, fGlow]);
        }    
    }

    //  End CHILD light controller

  4. 1 hour ago, Chic Aeon said:

    So I tried this just because LOL.

     

    I now have two blinking boxes (mother and child non-linked as I assumed that was the point). They have glow and full bright and blink nicely although I didn't expect the mother to blink too.   I also got a LOT of script errors. Pasting them in.  I am just barely (by teeny bit) a script person LOL.

    Tha's all I got. Assume it will make sense to those that know. I haven't played with the error area :D.

    [20:09] llSetPrimitiveParams error running rule #2 (PRIM_FULLBRIGHT): arg #2 (fullbright) integer expected but float given.
     

    Ohh, minor bug it seems, I used PRIM_FULLBRIGHT, ALL_SIDES instead of  PRIM_GLOW, ALL_SIDES to the glow parameter, try to replace

    llSetPrimitiveParams ([PRIM_GLOW, ALL_SIDES, nState, PRIM_FULLBRIGHT, ALL_SIDES, fGlow]);

    with

    llSetPrimitiveParams ([PRIM_GLOW, ALL_SIDES, nState, PRIM_GLOW, ALL_SIDES, fGlow]);

    If you do not want the mother to blink out-comment light(bFlash ); in timer()

  5. You do not specify, if we are talking about an linked object or separate distributed objects placed around. Rule #1 all programming/scripting, define what should be done!

    Simple solution below if separated objects. Two scripts mother and child, place mother in object controlling and child in all the others objects.

    MOTHER.LSL

    //      Simple region wide light controller
    //      
    //      Place this script MOTHER in object controlling
    //
    //      If it works, it was made by me :D
    //

    integer bSwitch= FALSE;
    integer bFlash= FALSE;
    float fTimerPeriod= 0.333;
    float fGlow;

    integer nChannel;


    light( integer nState )
    {
        if (nState==TRUE)
            fGlow= 0.6;
        else
            fGlow= 0.0;
            
        llSetPrimitiveParams ([PRIM_GLOW, ALL_SIDES, nState, PRIM_FULLBRIGHT, ALL_SIDES, fGlow]);
    }

    default
    {
        state_entry()
        {
            nChannel=  0x80000000 | (integer) ( "0x" + (string) llGetOwner() );
        }
        
        on_rez(integer start_param)
        {
            llResetScript();
        }
     
        changed(integer change)
        {
            if (change & CHANGED_OWNER)
            {
                llResetScript();
            }
        }      
        
        touch_start(integer total_number)
        {
            bSwitch= !bSwitch;
            if (bSwitch==TRUE)
            {
                llSetTimerEvent( fTimerPeriod );
            }
            else
            {
                llSetTimerEvent( 0.0 );
                bFlash= FALSE;
                light( bFlash);            
                llRegionSay( nChannel, (string) bFlash );
            }
        }
        
        timer()
        {
            bFlash= !bFlash;
            llRegionSay( nChannel, (string) bFlash );
            light(bFlash );
        }
    }

    //  End MOTHER light controller

    CHILD.LSL

    //      Simple region wide light controller
    //      
    //      Place this script CHILD in the other objects
    //
    //      If it works, it was made by me :D
    //

    integer nChannel;
    integer listenHandle;
    integer nState= FALSE;
    float fGlow;

    default
    {
        state_entry()
        {
            nChannel=  0x80000000 | (integer) ( "0x" + (string) llGetOwner() );
            
             listenHandle = llListen(nChannel, "", NULL_KEY, "");
        }
        
        on_rez(integer start_param)
        {
            llResetScript();
        }
     
        changed(integer change)
        {
            if (change & CHANGED_OWNER)
            {
                llResetScript();
            }
        }    
        
        listen(integer channel, string name, key id, string message)
        {
            if (channel==nChannel)
            {
                nState= (integer) message;
                if (nState==TRUE)
                    fGlow= 0.6;
                    else
                fGlow= 0.0;
                llSetPrimitiveParams ([PRIM_GLOW, ALL_SIDES, nState, PRIM_FULLBRIGHT, ALL_SIDES, fGlow]);
            }
        }
    }

    //  End CHILD light controller

     

  6. From time to time I experience, I have to enable my media stream in my Linden Home, so try to set it again.

    Other things to check:

    • Did you block the streaming URL?
    • Many streaming services come and go, disappears from the net.
    • Some radio stations are not available everywhere in the world. Lately I often get this message "This station is not available in your country"
  7. I would as Rolig suggest handle the touch in the invisible object, something like this if the objects are linked.

    In the invisible object:

        touch_start(integer total_number)
        {
            llMessageLinked(LINK_ALL_OTHERS, 0, "you_touched_me", "");
        }

    In the object behind:

        link_message(integer sender_num, integer num, string msg, key id)
        {
            if (msg=="you_touched_me")
            {
                llOwnerSay("Uhh it tickles :-)");
            }
        }

    Notice, you can also examine the sender_num to ensure correct handling of touched object and avoid false clicks, but the simple solution above should work.

    If the objects are not linked, you have to use llListen in the object behind and send message from the touched object.

  8.  

    Hotlaps, "the hottest challenge in SL Sailing"

    Still 3 days left for the hotlaps at Blue Lagoon Naturist Estate - Thursday 18th of May to Saturday  20th of May 2017

    Come and do a fast hotlap, enjoy the beautiful sim made of 24 connected sims with public sail areas and roads along seaside, mountains. Lot to see and explore from unique landmarks to surfing, bungee jumping, hang-gliding.

     

    LM: http://maps.secondlife.com/secondlife/Rising%20Sun%20Isle/75/190/22

    Hotlaps_BlueLagoon.png

  9. 3 hours ago, Love Zhaoying said:

    Just read up on the update. This is interesting. Does SL run "any better" in "game mode" under the Windows 10 Creators update?

    People report minor better FPS (8-10 or better FPS) and better performance in general in games depending on their system. Downside is resources are allocated to the game and hence slows other active running apps, say you Alt+Tab to other running programs to check web-pages, e-mail etc., you will experience those program run sluggish - how much depending on overall speed of your computer.

    Now 8-10+ FPS does not sound as much, but could make an users SL experience more fluid and better, if say FPS jumps from 14 FPS to more fluid 24 FPS.

    • Like 1
  10. 2 hours ago, iBrat said:

    Draw distance 128m Atmospheric shaders and advanced lighting model are both marked. That good?

    Yes it should be OK, now I also have a Linden home as you - nice suburbia :D

    How old is your laptop? The fan could be worn or there are dust, hair in it. Now opening a laptop is a very delicate procedure and it is easy to do it wrong, so unless your are skilled, do not attempt to do it your self.

    Now I experience the same heavy load on my fan in my older ASUS N-serie laptop - opening FS causes heavy fan activity, it settles down after a few minutes and then depending on my SL acitivty, it kicks in again. In general SL requires a lot of power usage and heavy usage of the graphic card.

    As Alwin said one explanation could be heavy textures in the neighboring houses.

    A good trick is to lift the laptop free of the ground a little, place a flat item at rear of it, to let air circulate below and better.

    Last - but sadly - it could also be a sign of a laptop entering its last life... and hot components does not extend its lifespan :(

     

  11. Some thoughts on this topic...

    Also consider when to use a notecard, often it is used to store settings, so we can let the user change a given thing like color etc.Here a combination of lists and separate notecards for different parts of a given linked item could be the answer.

    So instead of reading in a huge single notecard covering say body, eyes, hair, fingers, we only read a small simple notecard on demand.

    Downside is of course it is more complicated to program and takes more scripts, but a balanced approach could give a most faster experience for the user.

    Or ditch the notecard and let the user change say color with a HUD, where we just change the values within the object in direct response - within the object values stored as list of just numerical values. This approach requires careful planning - sit down and draw on paper what to do and implement it as a script.

    If a notecard is used to display huge amount of text information, consider other approaches - for example use a web site to display it on a prim/HUD.

    • Like 1
  12. 2244136934_d404cae3d1_o.jpg.b90a8fb86c0cab43ea079cf67f6602e3.jpg

    The new function

    llBigListen( integer channel, string name, key id, string message, float nDecibel, integer bHighVolume )

    is the answer - you are able to listen to 5,000 sims and fine tune to within 0.15 cm of the source emitter.This will revolutionize SL communication, but remember to set the boolean .bHighVolume to TRUE to protect against overload of user.

    Have a nice weekend xD

    (And yes just for fun!)

     

    • Like 2
×
×
  • Create New...