Jump to content

Edu Csak

Resident
  • Posts

    19
  • Joined

  • Last visited

Posts posted by Edu Csak

  1. I'm using the wiki provided script for llRequestExperiencePermissions and I've notices it's works on the SECOND try 
    First try NEVER ever works. The object rezzes then nothing else happens. Then I try again and it works
    Can anyone, please explain to me what's wrong?

    https://wiki.secondlife.com/wiki/LlRequestExperiencePermissions

    You can check inworld if you're online http://maps.secondlife.com/secondlife/Tenerona/191/9/2148

  2. Thank you very much @Rolig Loon but I give up. I feel myself very stupid not figuring out a formula to have it done. Playing randomly with offset values is testing my patience to its highest level LOL (I've tried, I swear) ;) 
    Tried working round your suggestion using prim_texture under llSetLinkPrimitiveParamsFast but I've only managed to make it work with
    llSetLinkTextureAnim(side, ANIM_ON | LOOP, face, gFrameY, gFrameX, 3, 1, 0); (3 = number of image slice I wanna use)
    Once again, thank you! But its way more advanced for my expertise 😘 

  3. On 11/30/2019 at 4:50 PM, Edu Csak said:

     

    0.jpg

    Sorry, still cant figure it out how it really works. Wiki's descriptions make me feel illiterate, literally LOL

    wiki says:

    for scale:

    • float u horizontal (x) scale in the interval [-100.0, 100.0]  
    • float v vertical (y) scale in the interval [-100.0, 100.0]

    and for offset:

    • float u horizontal (x) offset in the interval [-1.0, 1.0]  
    • float v vertical (y) offset in the interval [-1.0, 1.0]

    But still have no idea how to show just "lime green 7" or "pink 4" on prim 
    Sorry again bothering, but wiki makes no sense bout explaining clearly the mechanism for self-learners non professional scripters ;)
    Kudos for you all for the patience

  4. Thank you Qie & Rolig,

    I ain't no programmer and it's hard to ask wiki when you've got no clue what to search for xD 
    Took a look on llOffsetTexture but wiki isn't clear about child prims (yes, the prim is a child one)
    So I'd better use llSetLinkPrimitiveParamsFast [ PRIM_TEXTURE, integer face, string texture, vector repeats, vector offsets, float rotation_in_radians ], right? 
    Now I've got to understand this cuz have no idea what it means
    • float    u    –    horizontal (x) offset in the interval [-1.0, 1.0]    
    • float    v    –    vertical (y) offset in the interval [-1.0, 1.0]    
    I'll do more researchs (really wish wiki is noobie-wise) ;) 

    Thank you Qie & Rolig

  5. Hello scripters!

    I've got this texture and a script that allows to choose which frame (1-15) is to be applied on a prim.
    I used llSetLinkTextureAnim to have it applied.
    So far, so good.

    I've also put a resizer script also on root prim and tested.
    The menu popped up and on my fist selection of scale (0.1, 0.5... etc) was ok, worked pretty fine. It resized and the texture was ok after it.

    BUT

    If I ask to scale one more time, the texture animation "breaks" 

    My question is: llSetLinkTextureAnim is the better method or the is another better way?
    TYVM
     

    Made a video: seeing is better than reading 😎 Watch how the script acts https://www.youtube.com/watch?v=xhrbdIYk3jE

     

    integer CHAN= -99099;  
    integer dialhandle;
    key old_owner;
    list Tchoose = ["RED","DEEP RED","ORANGE","LIGHT BROWN","BROWN","YELLOW","YELLOW LIGHT","LIME GREEN","GREEN","CYAN","BLUE","NAVY BLUE","PURPLE","PINK","GREY","BLACK"];
    string Tmsg = "\nPlease choose ";
    integer gMenuPosition;
    float frame;
    string desc;
    
    Menu()
    {
        llListenRemove(dialhandle);
        llSetTimerEvent(0.0);
        integer Last;
        list Buttons;
        integer All = llGetListLength(Tchoose);
        if(gMenuPosition >= 9)   //This is NOT the first menu page
        {
            Buttons += "<<";
            if((All - gMenuPosition) > 11)  // This is not the last page
            {
                Buttons += ">>";
            }
            else    // This IS the last page
            {
                Last = TRUE;
            }            
        }    
        else if (All > gMenuPosition+9) // This IS the first page
        {
            if((All - gMenuPosition) > 11)  // There are more pages to follow
            {
                Buttons += ">>";
            }
            else    // This IS the last page
            {
                Last = TRUE;
            }            
        }
        else    // This is the only menu page
        {
            Last = TRUE;
        }
        if (All > 0)
        {
            integer b;
            integer len = llGetListLength(Buttons);
            // This bizarre test does the important work ......        
            for(b = gMenuPosition + len + Last - 1 ; (len < 12)&&(b < All); ++b)
            {
                Buttons = Buttons + [llList2String(Tchoose,b)];
                len = llGetListLength(Buttons);
            }
        }
        dialhandle = llListen(CHAN,"",NULL_KEY,"");    
        llSetTimerEvent(10.0);
        llDialog(llGetOwner(),"\n"+Tmsg,Buttons,CHAN);
    }
    force_update() {
        desc=llList2String(llGetLinkPrimitiveParams(2, [ PRIM_DESC ]), 0);
        frame = llListFindList( Tchoose, [desc] );
        llSetLinkTextureAnim(2, ANIM_ON | SMOOTH, ALL_SIDES, 4, 4, frame, 1.0, 1.0 );
    }
    default
    {
        changed(integer change)
        {
            if (change & (CHANGED_SCALE | CHANGED_TEXTURE | CHANGED_LINK | CHANGED_ALLOWED_DROP | CHANGED_SHAPE | CHANGED_COLOR | CHANGED_INVENTORY | CHANGED_TELEPORT | CHANGED_REGION_START | CHANGED_REGION |CHANGED_OWNER))
            { force_update(); }
        }
        on_rez(integer num) { 
            if(old_owner != llGetOwner()) { llResetScript(); }
            force_update();
            llListen(CHAN,"",NULL_KEY,"");
        }
        state_entry()
        {
            old_owner = llGetOwner();
            force_update();
            llListen(CHAN,"",NULL_KEY,"");
        }
    	touch_start(integer num)
    	{
    		Menu();
    	}
        listen(integer rCHAN, string name, key id, string msg)
        {
                    if(llGetOwnerKey(id) != llGetOwner()) return; 
                    if (msg==">>")
                    {
                        llListenRemove(dialhandle);
                        llSetTimerEvent(0.0);
                        gMenuPosition += 10;
                        Menu();
                    }
                    else if (msg=="<<")
                    {
                        llListenRemove(dialhandle);
                        llSetTimerEvent(0.0);
                        gMenuPosition -= 10;
                        Menu();
                    }
                    else if (msg!="CLOSE" && llStringLength(msg)!=0) {
                        frame = llListFindList( Tchoose, [msg] );
                        llSetLinkPrimitiveParamsFast(2, [PRIM_DESC, msg]); 
                        llSetLinkTextureAnim(2, ANIM_ON | SMOOTH, ALL_SIDES, 4, 4, frame, 1.0, 1.0 ); //////////////// HERE SETS THE FRAME ON PRIM
                        llOwnerSay(msg+" applied");
                    }
        }
    }

     

    0.jpg

  6. Hi!

    I'm trying to make a script where a item code is given and it grabs its respective menu list, but I can't find on wiki what command I should use to transform the value I've got into a variable of the menu that should be shown.
    Example: the item 48 is given. So, the tint48 menu list should be prompted.
    I came up with this idea of putting on a list (tintableItems) which contains the item (48), the menu that should prompt (tint48) and then the values that should go on (faces48).
    But I'm stucked on how to transform the value I get (tint48) into the list values of it.

    I don't even know if it's possible, but I'm searching wiki for this answer but I cannot find.

    I'm trying to simplify the coding
    Based on the item given, a menu should popup with the values provided.
    I don't want to make N lists, one for each item neither nesting neverending IFs to check if item 48

     

    integer CHAN= -999;
    key old_owner;
    integer item=48;
    list tintableItems = [
        48,"tint48","faces48"
    ]; // where 48 is the item / tint48 its menu / faces48 the values 
    list tint48 = ["TEETH","ALL","CLOSE","COLLAR","PULL TAB", "BODY"];
    list faces48 = ["3","ALL_SIDES","","1","2","0"];
    
    
    default
    {
        state_entry()
        {
            old_owner = llGetOwner();
            if (item == (integer)llList2String(tintableItems, (integer) llListFindList(tintableItems, (list)item))) {
                //integer position = (integer) llListFindList(tintableItems, (list)item)+1; // gets the next position in List
                string value = llList2String(tintableItems, (integer) llListFindList(tintableItems, (list)item)+1); // grabs the value
                // now I want to use this value as parameter which menu list to use but don't know what command to get it done
                llDialog(old_owner, "Choose: ",  (list)value , CHAN);
                llListen(CHAN, "", NULL_KEY, "");
            }
        }
    
    }

     

    My problem lies here: llDialog(old_owner, "Choose: ",  (list)value , CHAN); 
    I know it's wrong. I just don't know what to do ;)

    TY!

    Screen Shot 2019-06-25 at 01.56.14.png

  7. OK, but my issue is how to change the llsay to start saying on channel 9 and not on 2. 
    Initially, the hud uses the channel 2. Then the item says to hud to use channel 9. But I cannot have it saying channel 9. keeps on llSay(ing) on channel 2

    state_entry() { chan=2; }
    listen(integer chan, string name, key id, string msg) {
        chan=(integer)msg;   // msg = 9 - script now must llSay on channel 9... not on 2 anymore

    }
    But the variable chan receives the new value on listen, but keeps on reapplying the 2 above

  8. I've got  an item and a HUD 
    The item says the HUD which channel to use, but I"m stucked on how it changes. It's keep on using the old channel setted.

    The HUD uses channel 2 (for example)
    Then the item says to HUD to use channel 9
    It listens, but keeps on using channel 2, not 9

    state_entry() { chan=2; }
    listen(integer CHAN, string name, key id, string msg) { chan=(integer)msg;  } // msg = 9

    What I'm missing?

×
×
  • Create New...