Jump to content

Sari6t

Resident
  • Posts

    75
  • Joined

  • Last visited

Everything posted by Sari6t

  1. Love this idea but its way past me on being able to even start. The logic is clear enough but syntax....nuuuu lol. I can imagine using something like a dataserver and some way of knowing when it stopped and started and then llGetPosition ,,,,,a timer() and a Listener for the arrival board with lRegionSay sending the updates and a few pounds of coffee and Advil at my side lol. Thanks for the idea though. In time I will give it a try . Thanks though.
  2. I used a stop watch on my phone a few times lol
  3. I need to understand why there was such a discrepancy in timings for the route . +- 18 seconds on a 13 minute round trip, over the course of a day the clock is so out its useless. I found a person who made a train station sensor with updating board in the MP, for a couple dollars it may be better than making it all.
  4. Yes of course, time dilation....totally forgot about that.,....cheers
  5. Hmmm, Well thanks for all the ideas. I will try a few and what one works best. As for my original question, can I assume then that the sim stays locked as far as timing goes and its the shuttle and other factors causing the timing fluctuations?
  6. Thanks Rolig, that is what I was going to do in the first place but was hoping to not have to write more scripts that might impact Sim script spare time, its a combat sim so need all the head room I can manage.
  7. I have a cool shuttle that runs around on its own between two parts of the sim. People love it but asked me for an Arrival/Departure sign. I found a simple count down clock that auto restarts once it reaches the end. So easy right, time the route , input the time and done. So, that's not working , lol . Although the route is automatic and unchanging, the timing varies still a great deal. So I have started thinking about a better way to do this but I was wondering before I get too fancy, is Sim time accurate. Meaning , can it fluctuate or is it likely the shuttle lags a bit here and there changing it's lap times making it a real life transport simulator lol.?
  8. lol, well I don't know what happened there but thanks again. Thanks to you I was able to extend this to FINALLY finish this more RP based llMapDestination gateway project. It seems fairly easy to use now for someone else, just add the destinations you like and drop it in. The rest just happens. I've managed to break it out into three compontents now as well. So it is very RP based. You can imagine a person with a set of contorls in a room (Menu), they walk to a lever and pull it(Sets and sends to the gateway) and before them a magical gateway appears that is persistant, allowing them and their freinds to follow. Its very cool. Well I think so lol. I wouldn't have been able to figure out how to do that however if it were not for your generous work. It was a months worth of education for me. Thank you so much.
  9. Yes yes 1000 times yes, that is it . Totally works. ty ty ty ty ty a millions times. Now I can carefully read and learn what you did. Thank you so much for sharing. This is really s ohelpful to now have it working and compare and learn. SL rocks when we share like this. Thank you ...super hugs.
  10. Managed to fix part of it. I need to reset things after making a selection and that stopped the menu form adding to itself. So Im realy only left with why in the parsed version the selection doesnt go through and in the llGetSubString it works perfectly. Every bit of script is the same with the exception of the dataserver section. This one works with the format SimName/<0.0,0.0,0.0> in a NC dataserver(key qID, string data) { if (qID == gQuery) { if (data != EOF) { integer idx = llSubStringIndex(data,"/"); if (~idx) { Sim += [llStringTrim(llGetSubString(data,0,idx-1),STRING_TRIM)]; //Site names from NC URLs += [llStringTrim(llGetSubString(data,idx+1,-1),STRING_TRIM)]; //URLs 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); } else { llSay(0,"Initialized."); state running; } } } and this one populates the dialog menu but thats it with the format of the NC being DesName/SimName/<0.0,0.0,0.0> dataserver(key qID, string data) { if (qID == gQuery) { if (data != EOF) { { list temp = llParseString2List(data,["/"],[]); string Sites = llList2String(temp,0); string Sim = llList2String(temp,1); vector URLs = (vector)llList2String(temp,2); gDlabels += (string)gCount + ". " + llList2String(temp,0) + " \n"; gLstMnu += [(string)gCount]; ++gCount; }
  11. It almost works and maybe someone with a little more knowledge can help me past this last hurdle. First let me preface with, this is kind of long and what I have done is comment the heck out of it to try and understand for myself what is going on and where I am struggling. Secondly, it's worth noting that I have a working version that uses 2 variable, simName and Vector which is just a minor tweak of Roligs and Voids really great work. Ok so onto the issue. The parsing of the NC goes well and the Menu gets populated but it sort of stops there. I CAN by way of using llSay, my debugger of choice lol, find the CHOICE of my menu selection but nothing gets passed to the llMapDestination variables and I think its to do with some msg stuff but I'm really out of my depth at that point. Also, and this might just be a side effect of something I did. The menu starts to add the first line to the menu repeatedly , so you end up with a succession of the first selection in the menu. Cool things to learn about as far as I can tell. Anyway , I'll post the code and there is an example NC at the bottom to play with. Thanks in advance, I'm actually learning. No really I am // llMapDestination from parsed notecard// Notecard format LocationName/SimName/<128.0,22.0,22.0>//URL Chooser -- Rolig Loon -- February 2011// Reads web site information from a notecard in the format Site name = http://www.a_great_URL.com// and presents result in a URL prompt.// Multipage dialog function uDlgBtnLst by Void Singer ( http://community.secondlife.com/t5/LSL-Scripting-Library/Dynamic-Multi-page-Dialog-AKA-Pagination/m-...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 list vLstRtn = llListInsertList( llList2List( gLstMnu, vIdxBeg, vIdxBeg + 9 ), //-- grab 10 dialog buttons (list)(" <<---(" + (string)(vIntPag + (-(vIntPag > 1) | vIdxMax - vIntPag)) + ")"), //-- back button -1 ) + //-- inserts back button at index 9, pushing the last menu item to index 10 (list)(" (" + (string)(-~((vIntPag < vIdxMax) * vIntPag)) + ")--->>"); //-- add fwd button at index 11 return //-- fix the order to L2R/T2B llList2List( vLstRtn, -3, -1 ) + llList2List( vLstRtn, -6, -4 ) + llList2List( vLstRtn, -9, -7 ) + llList2List( vLstRtn, -12, -10 );}//-- Anti-License Text --//*/// Contributed Freely to the Public Domain without limitation. //*/// 2009 (CC0) [ http://creativecommons.org/publicdomain/zero/1.0 ] //*/// Void Singer [ https://wiki.secondlife.com/wiki/User:Void_Singer ] //*///--list gLstMnu;integer gLine;string gCard;integer gDChan;integer gDLisn;key gQuery;integer gCount;list Sites;list URLs;list Sim;list gDlabels;string simName;vector tpDest;vector lookAt = ZERO_VECTOR;default{ state_entry() { if (llGetInventoryNumber(INVENTORY_NOTECARD) > 0) { gCard = llGetInventoryName(INVENTORY_NOTECARD,0); gQuery =llGetNotecardLine(gCard,0); gCount = 1; } else { llOwnerSay("No URL notecard detected."); } } changed (integer change) { if (change & CHANGED_INVENTORY) { llResetScript(); } } /* // Original code to use NC with http:// style urls from menu as explained above dataserver(key qID, string data) { if (qID == gQuery) { if (data != EOF) { integer idx = llSubStringIndex(data,"/"); if (~idx) { Sim += [llStringTrim(llGetSubString(data,0,idx-1),STRING_TRIM)]; //Site names from NC URLs += [llStringTrim(llGetSubString(data,idx+1,-1),STRING_TRIM)]; //URLs 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); } else { llSay(0,"Initialized."); state running; } } } */ // Use notecard with location/SimName/<128.0,128.0,0.0> format for menu and llMapDestination Teleport dataserver(key qID, string data) { if (qID == gQuery) { if (data != EOF) { { //Parse the NC . First read it (data) and look for ["/"] to know what the separators are. list temp = llParseString2List(data,["/"],[]); string Sites = llList2String(temp,0); // This says that the list called "Temp" and the first data blob is 0 string Sim = llList2String(temp,1); // This is the same as above but now its the second bit, but we start at 0 so it's 1 vector URLs = (vector)llList2String(temp,2); // Etc. But the URLs is a vector so you need to say so. gDlabels += (string)gCount + ". " + llList2String(temp,0) + " \n"; //Dialog text.Read "temp,0" to get the location name gLstMnu += [(string)gCount]; // Button labels. make some buttons with the information above ++gCount; // g for Global. Count em up. // Check with llSay if that all works so far? YES PARSING CORRECTLY // llSay(0, "Dest: "+(string)Sites + " SimName: "+ (string)Sim+" Coord: "+(string)URLs + " \n "); } gQuery = llGetNotecardLine(gCard, ++gLine); // Gets the Notecard from inventory and I assume since gLine is an integer and there is ++ attached it incremtally counts through it. } else { llSay(0,"Initialized."); // Once all the above is done say its "Initialized" .. thats a good thing. state running; // Then we change states. Like NY to Cali or something.....not really. but sort of } } }} state running{ changed (integer change) // Did anything change and if it did reset. { if (change & CHANGED_INVENTORY) { llResetScript(); } } touch_start(integer num) // Touch the prim { llSetTimerEvent(100.0); // Set a timer because ...timer gDChan = (integer)("0xF" + llGetSubString(llDetectedKey(0),0,6)); // Not a clue. guessing it's smart person code for a Listener channel. gDLisn = llListen(gDChan,"","",""); // Then this listens to the above thing and I suspect partly this is where it goes wrong. string temp = ""; // fill in the blank, which will be menu items shortly integer i; // no code can exist with out an i //Display the first 10 sites for our Menu for (i=0;i<10;++i) // See, must have an i thing to add up things. Thats what this does. { temp += llList2String(gDlabels,i); // make those menu buttons from the code up above where gDlabels lives } llDialog(llDetectedKey(0),"Which site do you want to visit? \n"+ temp, uDlgBtnLst(1) ,gDChan); // Here is where I think I have a problem too with the gDChan not getting what I selected or something. } listen (integer channel, string name, key id, string msg) // Ok get yer ears on. { llSetTimerEvent(0.0); llListenRemove(gDLisn); // Has the user clicked either the ">>" or "<<" button? if (!llSubStringIndex( msg, " " )) //-- detects 2 (hidden) leading spaces { llSetTimerEvent(10.0); gDLisn = llListen(gDChan,"","",""); string temp = ""; integer menu = (integer)llGetSubString( msg, -~llSubStringIndex( msg, "(" ), -1 ); // Maybe this is part of the issue too integer i; for (i=(10*(menu-1));i<(10*menu);++i) { temp += llList2String(gDlabels,i); } llDialog( id, "Which site do you want to visit? \n"+ temp, uDlgBtnLst(menu), gDChan ); // And here is the gDChan again. ?? } else // If user has clicked a numbered button { integer Choice = (integer) msg -1; llSay(0, (string) Choice); // Returns the # of my selection and thats all simName = llList2String(Sim,Choice); // Here is my monkey work. So this works using Roligs version with Sim Name, Vector tpDest = llList2Vector(URLs,Choice); // Its just defining a pair to be plugged into the llMapDestination below state Tele_state; // Change states again to finally TP } } timer() // A timer for the Dialog Menu { llSetTimerEvent(0.0); llWhisper(0,"Timeout. Please close the dialog box on your screen."); llListenRemove(gDLisn); } } state Tele_state // And now we can TP to our destination{ state_entry(){ llSetTimerEvent(20); // Close things if you forget why you did this } timer(){ llSetTimerEvent(0); llListenRemove(gDLisn); state default; } touch_start(integer num_detected){ llMapDestination(simName, tpDest, lookAt); // After all that we finally get to two variables and lookAt which is a constant more or less. And if it all works you have a cool NC reading simple to update grid wide Teleporter that is a neat basis for making it even more interesting. Like separating it out to a control and say a magic mirror with animations or whatever. llListenRemove(gDLisn); state default; }} // End //////////////////////////////NoteCard Example //////////////////////// /* Help Island/Help Island Public/<128.0,128.0,24.0>Space Station/Raglan Galaxy/<132,157,627>Lelutka /LeLutka/<125, 98, 22>3D TREES/zen island/<216, 149, 21> */
  12. Thank you Rolig, your script is really good btw. I came to the same conclusion just before checking the forum,yay, and now I know exactly how llGetSubString works and I guess more importantly how is doesn't. Its been well worth the effort of being wrong so many times and learning bit by bit. I think I know enough about LSL to be just skilled enough to be bad and that is not a minor thing. Being able to adapt other scripts I find over the course of many hours and days more usually is rewarding. Thanks again for your help.
  13. Hey there, Found a wonderful script written by Rolig Loon, it does mostly what I needed and with my fumbling around I have managed to get it to populate a menu from a NC and then pass that to llMapDestinations and TP. Sounds like Im done but Im not Thing is this. The way the script works is it uses llGetSubString and so far it is brilliant if you have a NC with NAME and Vector. Meaning SIMNAME and <0.0,0.0,0.0> type thing. But I need a location name then sim name and vector. so instead of the NC looking like SimName <0.0,0.0,0.0> I need Name / SimName / <0.0,0.0,0.0> to be parsed and fed along. So my question is. Can I get there using llGetSubString or do I need to rewrite the whole thing to use something like llList2String etc. Here is a snippit dataserver(key qID, string data) { if (qID == gQuery) { if (data != EOF) { integer idx = llSubStringIndex(data,"/"); if (~idx) { Sites += [llStringTrim(llGetSubString(data,0,idx-1),STRING_TRIM)]; //Site names from NC Sim += [llStringTrim(llGetSubString(data,idx+1,-1),STRING_TRIM)]; //Sim Name from NC // URLs += [llStringTrim(llGetSubString(data,idx+1,-1),STRING_TRIM)]; //URLs 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); } elseThe commented out //URLs is the one I need returned and havent yet got it figured out with the +1 -1 stuff. Thanks if you should take this on and thanks for Rolig to have don this in the past, like so many things from years back this person has been a great help.
  14. Your idea is along the right path. Go to this link and read and lear the first example. For one thing it works and two you can compare what you wrote to it and learn the syntax fo rnext time. http://wiki.secondlife.com/wiki/LlDialog
  15. Thank you for such a detailed response. I have new ways to approach this now. The texture stopping is odd, it has happened to me and Im not sure why it does that. But at any rate this is great help. I have a bevy of option. Thanks again.
  16. Oh yes thats what I needed to understand. Thank you. I can see from the wiki that the target will allow for what I need potentially. I will experiment with that. Thank you
  17. I am looking for a sim friendly way to accomplish this. I can do it and lag a sim likely from what Ive read using timers and loads of scripts but I am not doing that, Here is the question. I have a row of dome lights. lets say 4 for the example. They are mesh and the dome has a face number of 0 on each. What I am wondering is this. Is it possible to use a texture that animates to create the effect of a flashing series of lights in an efficient manner? Meaning one script to control the works verses one script per button. I can already control the primparams across the set but to make them flash is where timers would come in and ...well I have a lot of these potentially. anyway thanks in advance. :)
  18. That workefd after some playing around. Thanks Rolig
  19. Too funny , thats what my wiki was open too when I got this message. Would it be possible to combine that with say a llGetPos , if I have that right, to add a height restriction. for example. IF the REGION is MYREGION and the vertical height is over 1000M then dont rez or something like that. I'll see what I can do with that.
  20. So my Tardis scripting journey is nearing an end....yay. Only a couple thing left to sort and this is one. I have a Tardis that rezzes around me when I teleport. It works great and I was so proud for a minute lol Then from inside the Tardis I teleported back to the console room and.......oh man....it rezzed again. Of course it would though right. How does the script know where I am and what to do. So, this is where I am stuck. I'm not sure what the approach is to tell it not to rez when I am in the comsole gateway but to rez anywhere else. I was thinking that somekind of " if (Im at home then dont rez) type thing is it , but what shoud that be? llGetRegion and llGetPos, seems logical, or maybe use a vector console; and say if console == <xxx.xxx.xxx> or something. Im really jsut not sure. Here is the code so far maybe you can help? //Rez the tardis on Teleport string object = "Tardis V1.06";//Object in inventory integer start_param = 10; rotation rot; vector home_console ; // Dont rez if you are TP to home console coordinates //////////// THINGS TO ADD //////////// /* 1. Don't rez if I have teleported back to the console room 2. Hide the avatar in the ground for x time on teleport until exterior has rezzed. Just needs to be a guess */ default { state_entry() { llPreloadSound("88cf9fd3-5343-382d-5264-902b4554fba1");//This loads the sounds into all in range viewers and cuts delay between sounds. llPreloadSound("806276be-cad8-d075-31c3-2a59be4e6ae8");//All sound parameters can be the name of a sound in the prim's inventory or a UUID of a sound"); rot = llEuler2Rot(< 0, 90, 90> * DEG_TO_RAD); } changed (integer change) { if(change & CHANGED_TELEPORT) // If I TP somewhere do the next thing // if (I've TP'd back to the console then don't do it ) IF ONLY CODE WAS THAT EASY FOR ME { llSetSoundQueueing(TRUE); // Queue the music, sadly this sucks, only sort of works sometimes llPlaySound("87cf9fd4-5343-382d-5264-902b4554fba1", 0.5); llPlaySound("806376ce-cad8-d075-31c3-2a59be4e6ae8", 0.5); llRezObject("Tardis V1.06", llGetPos() + <0.0, 0.0, 0.725>*llGetRot(), ZERO_VECTOR,llGetRot() * llEuler2Rot( <0.0, 0.0, 180.0> * DEG_TO_RAD ), 0); //Rez the thing and face the doors...working :) // Then we tell the tardis to fire off the script inside to fade and glow in , when it feel s like working llRegionSay(77,"show"); // this doesnt always fire properly. Try using the STATE TIMER } } }
  21. I've spent over 100 hours learning LSL in the past two weeks, I kid you not. In that time I have learned a great deal but I am at my wits end on this one. All I want is to be able to do what I see on other products that I have. For example, my NLS tardis allows you to communicate across sims on channel 0 when the doors are open. I imagine they use this to also send the Dematerialization for the Tardis the sameway,. I know it uses llHTTPReqest and http_response etc. llSay, llListen etc. I know that the URL is impermanent and so I persued making tinyurl.cc and a Goodle API that makes for a static URL. I created a mySQL database and learned how to pass infromation from SL and back , loggin URLs and region names, positions and updating Primary Key fields and more. All very rewarding. I found Wizardry and Steamworks 2012 grid wide chat relay, and it does what I want in that it works as long as you have two regions minimum to ensure that the URLs get passed around but it isnt scaleable and I dont have two regions to put something that has to run al the time to work. My sheer ignorance is what is keeping me from getting this to work and its super frustrating. If anyone wants to help out I would be most grateful. I'm just so lost as how to make this work.
  22. Yes yes yes yes yes 1000% better!! Thanks I get that you are doing. I can use that in other things now. I need to find a code buddy who can look at all the stuff I have written and give them a good laugh Thank you
  23. It sort of works now. So to clarify the original idea it's like this. Imagine you are on your spaceship, of course, and you want to see who is around. You go to your scifi looking panel and hit a button , it shows the Avi's that are near and keeps updating while its on, you are satisfied with the info and turn it off and it goes back to not displaying anything. You then grab space coco and watch netflix. Here is the mostly working frankenstein code. list gPeople = [];list gDist = [];integer myswitch;default{ state_entry() { myswitch = FALSE; llSetTimerEvent(2.0); } touch_start(integer total_number){ if(myswitch==FALSE) { myswitch=TRUE; llSetTimerEvent(2.0); } else if (myswitch==TRUE) { llSetText("Region Scanner",<0,1.0,0>, 1.0); myswitch=FALSE; llSetTimerEvent(0.0); } } timer() { if(myswitch==FALSE) { gPeople = llGetAgentList(AGENT_LIST_REGION, []); gDist = []; integer x; integer num = llGetListLength(gPeople); vector pos = llGetPos(); for(;x<num;x++) gDist += [llVecDist(pos, llList2Vector(llGetObjectDetails(llList2Key(gPeople, x), [OBJECT_POS]), 0)), llKey2Name(llList2Key(gPeople, x))]; gDist = llListSort(gDist, 2, 1); llSetText(llDumpList2String(gDist, "\n"), <0,1,0>, 1.0); myswitch=TRUE; } else if (myswitch==TRUE) { myswitch=FALSE; }}}
  24. put the if inside the timer() now there's an idea...lol omg why didn't I try that. Thank you
  25. Ah thanks everyone now I get it. Yes, I am ignorant more than confused about how events work but now I totally understand so thank you, my poor brain aches from all this lol ...whew more clarity. I keep trying to do thing that are WAYYYYY beyond my ability but what the heck its fun. You should see the grid wide chat /teleport llMap /external mysql url tardis network thing Im frankensteining together lol. I'll put all this together and get what I need now for a simple on/off local region scanner. Thanks again.
×
×
  • Create New...