Jump to content

raj441977

Resident
  • Content Count

    10
  • Joined

  • Last visited

Posts posted by raj441977


  1. 13 minutes ago, Rolig Loon said:

    So include an experience_permissions_denied event and see what the error is.  That will tell you what's going on.  My almost random guess is that your script isn't really in the Experience.

    OH MY GOD!!!! I forgotten to enable the experience in the script 😩  ..... now it's working fine... Thank you very much for your help 🙏

    • Like 2

  2. 1 minute ago, raj441977 said:

    everything was working fine in the previous code and I changed as you advised, but still not working.

    I have tested in every aspect as possible to me, the problem is in llRequestExperiencePermissions(kAgent, ""); this is not asking any permission and not working further, as the Experience created by me so I thought there might problem in it, so I tested that using collision event TP and that working absolutely fine, but not here... and I tested from another account after removing the experience, still not working not asking the permission of experience..... I checked the generated data is perfect when it calling llRequestExperiencePermissions but still that not actually asking any permission !!!! Strange

     


  3. On 4/28/2020 at 10:43 PM, Rolig Loon said:

    So, how does it fail?  I works fine for me, although I suggest making a couple of small (mostly cosmetic and personal preference) changes:

    1.  Modify your dataserver event by providing an alternate exit when data ==EOF  :

         

    
            else
            {
                iTouched = FALSE;
            }

          and set iTouched = TRUE in state_entry.  That way, the teleporter is disabled unless the script reads the notecard successfully.

    2. Remove the llWhisper line of code at the end of the timer event or replace it with 

              llDialog(kAgent,"\nPlease close this dialog box",["OK"],gDLisn);

        and then move the llListenRemove statement after that line so that the channel is still available for the dialog.  The "OK" response will be unheard, but that's fine.  It will close the dialog.

    everything was working fine in the previous code and I changed as you advised, but still not working.

    I have tested in every aspect as possible to me, the problem is in llRequestExperiencePermissions(kAgent, ""); this is not asking any permission and not working further, as the Experience created by me so I thought there might problem in it, so I tested that using collision event TP and that working absolutely fine, but not here... and I tested from another account after removing the experience, still not working not asking the permission of experience..... I checked the generated data is perfect when it calling llRequestExperiencePermissions but still that not actually asking any permission !!!! Strange


  4. I was trying to create a teleport system using menu button and the code given in this topic with some modification

    but I Failed, here is my code can anyone help me to find out where is my mistake ?

     

    Note card

    Club=<32,96,2500>
    Store=<32,96,1000>
    Ground=<32,96,34>
    Deep=<32,96,1>

     

    LSL Script

     

    string gCard = "destinations";
    string dText = "Touch to Teleport";
    vector gTarget;

    list gLstMnu;
    list gDlabels;
    list location;
    list address;

    integer gCount;
    integer gDChan;
    integer gDLisn;
    integer gLine;
    integer lMenu;
    integer nMenu;
    integer iTouched;

    key gQuery;
    key kAgent;

    list uDlgBtnLst( integer vIntPag ){
        integer vIdxBeg = 10 * (~-vIntPag);          //-- 10 * (vIntPag - 1), enclose "~-X" in parens to avoid LSL bug
        integer vIdxMax = -~(~([] != gLstMnu) / 10); //-- (llGetListLength( gLstMnu ) - 1) / 10 + 1
        lMenu = (vIntPag + (-(vIntPag > 1) | vIdxMax - vIntPag));
        nMenu = (-~((vIntPag < vIdxMax) * vIntPag));
        list vLstRtn = llListInsertList(llList2List(gLstMnu, vIdxBeg, vIdxBeg + 9),["Back"],-1)+["Next"];
        return llList2List(vLstRtn, -3, -1) + llList2List(vLstRtn, -6, -4) + llList2List(vLstRtn, -9, -7) + llList2List(vLstRtn, -12, -10);
    }

    default{
        
        on_rez(integer start_param){llResetScript();}
        
        changed(integer change){
            if(change & CHANGED_OWNER){llResetScript();}
            if (change & CHANGED_INVENTORY){llResetScript();} //restart if the notecard was modified
        }
        
        state_entry(){
            iTouched = FALSE;
            llSetText(dText, <1.0, 1.0, 1.0>, 1.0);
            if (llGetInventoryKey(gCard) == NULL_KEY){llOwnerSay("destinations notecard missing");}
            else{
                gQuery =llGetNotecardLine(gCard,gLine);
                gCount = 1;
            }
        }
        
        dataserver(key qID, string data){
            if (qID == gQuery){
                if (data != EOF){
                    integer idx = llSubStringIndex(data,"=");
                    if (~idx){
                        location += [llStringTrim(llGetSubString(data,0,idx-1),STRING_TRIM)];  //location names from NC
                        address += [llStringTrim(llGetSubString(data,idx+1,-1),STRING_TRIM)];  //address from NC
                        gDlabels += [(string)gCount + ". " +llStringTrim(llGetSubString(data,0,idx-1),STRING_TRIM) + " \n"]; //Dialog text
                        gLstMnu += [(string)gCount]; // Button labels
                        ++gCount;
                    }
                    gQuery = llGetNotecardLine(gCard,++gLine);
                }
            }
        }

        touch_start(integer total_number){
            if(!iTouched){ // no one can touch it again while it's trying to teleport you
                if (llDetectedType(0) & AGENT){ //though how on earth you can touch things without being an agent is a bit of puzzle
                    kAgent = llDetectedKey(0);
                    llSetText(llGetDisplayName(kAgent) + " is using the teleporter please wait...", <1.0, 1.0, 1.0>, 1.0);
                    llSetTimerEvent(10.0);//need to turn on the timer here in case the toucher changes his mind and wanders off.  If this happens, the object becomes touchable again.
                    iTouched = TRUE;
                    gDChan = (integer)("0xF" + llGetSubString(llDetectedKey(0),0,6));
                    gDLisn = llListen(gDChan,"","","");
                    string temp = "";
                    integer i;
                    for (i=0;i<10;++i){temp += llList2String(gDlabels,i);}
                    llDialog(kAgent,"Choose a destination \n"+ temp, uDlgBtnLst(1) ,gDChan);
                }
            }
        }
        
        listen (integer channel, string name, key id, string msg){
            if((msg == "Back") | (msg == "Next")){
                llSetTimerEvent(10.0);
                gDLisn = llListen(gDChan,"","","");
                integer menu;
                string temp = "";
                if(msg == "Back"){menu = lMenu;}
                else if(msg == "Next"){menu = nMenu;}
                integer i;
                for (i=(10*(menu-1));i<(10*menu);++i){temp += llList2String(gDlabels,i);}
                llDialog( id, "Choose a destination \n"+ temp, uDlgBtnLst(menu), gDChan );
            }else{
                integer Choice = (integer) msg -1;
                gTarget = (vector)llList2String(address,Choice);
                llRequestExperiencePermissions(kAgent, "");
            }
        }
        
        experience_permissions(key agent){
            if(agent == kAgent){
                llTeleportAgent(kAgent, "", gTarget, ZERO_VECTOR);
                llSetTimerEvent(2.0);
            }
        }
        
        timer(){
            iTouched =FALSE;
            gTarget = ZERO_VECTOR;
            llSetTimerEvent(0.0);
            llListenRemove(gDLisn);
            llSetText(dText, <1.0, 1.0, 1.0>, 1.0);
            llWhisper(0,"Timeout. Please close the dialog box on your screen.");
        }
    }
     


  5. 50 minutes ago, Alyona Su said:

    That actually looks like alpha-thrashing to me. As for "sparkles" I've seen it done in may ways, including what has already been described in comments above. Particles are the most effective is done right (rarely are they ever done right), animated textures are also another method. Then there's the experimental ways such as what Rolig describes. For clothing/body glitter or sparkles they usually duplicate the mesh and add bling to it, which is a massive waste of resources and possible lag-magnets.

    so which is the best way to add glitter effect with low lag, as I am strongly against to create unwanted lagging issue, should I use particle effect ?


  6. On 1/13/2020 at 3:09 AM, Fritigern Gothly said:

    Okay, I'm back for a moment with a little more info, now that I have re-read the original post, which I now understand is not about the scripting, but about HOW TO BUILD it...

    You will need two layers. I call them the touch layer, and the background layer.

    • The background layer will have - for example - the texture of the color gradient.
    • The touch layer has the draggable UI controls, which are drawn on a transparent background. This texture is then placed on a prim which I call the touch layer.
    • The touch layer is then placed on top of the background layer so that it matches up with the background layer.
    • Using llDetectedTouchUV() you detect where the prim was touched, this returns a vector between <0,0,0> and <1,1,0>.
    • Use this vector to adjust the offset of the texture on the touch layer. This effectively makes it look like the UI item follows the mouse.

    I hope this helps. I can't go in world at the moment, so I can't whip you up some example code, so I hope this will get you on your way. Note that it may be a good idea to have your script retrieve the link number of the touch layer, so you can do if(llDetectedLinkNumber(0) != touch_layer) return; so as to prevent other links to respond to that touch.

    ah, I got that, thanks...... I think I got the answer, probably this is what I wanted for... thank you very much

    • Like 1

  7. Sorry, I was not able to focus on my needs, actually I am not asking for LSL scripting or the touch detection matters or color generating, My need is the UI "Drag-able Slider", not the the code of it's interactions..... I tried lots, searched lots, but not able to build the drag-able content in SL (Just like Range Slider in HTML)

×
×
  • Create New...