Jump to content

Profaitchikenz Haiku

Resident
  • Posts

    2,835
  • Joined

  • Last visited

Everything posted by Profaitchikenz Haiku

  1. Using extra scripts and communicating by link messgaes is a very good way to seperate data and functionality, I use the method often. It also allows the main script to be reset without all the stored data in other scripts also being reset. The second script could reset when it detects a new notecard being dropped into the prim it is in, and after reading and checking the data, it can reset if necessary and tell other scripts also to reset, via link messages. My suggestion would be to use extra scripts to store all the data, and only pass the main script what it needs to know for the moment. I have looked quite a bit at scripts on my island using the region console, and as far as I can see, script memory is nothing like the issue script time is. Ypu are , I think, better off paying attention to getting the scripts running so that script time is op[timised. From personal experince coding, when you start to pay attention to streamlining the execution of a script, a by-product of this is that you usually improve the way it uses memory as well.
  2. There is one slight problem in that a script can only read the first 256 characters of a notecard line, so it does pay to monitor the line length as it gets built up. http://wiki.secondlife.com/wiki/Category:LSL_Notecard One trick is to take chatted lines from llDumpList2String out to an external editor and compact all the strings of consecutive zeros which is what I had to do in order to fit all the information I needed into the one line.
  3. You got in there in mid-edit while I was de-typoing my post I agree that PRIM_LINK_TARGET would be the ultimate way for the OP to go, but I was posting in the middle of tea and phone calls and kept it simple. Yes also to prim 1 and asking for local figures, if it's attached it does work with locals, but I can't remember now what the pos and rot local returns when the link set is rezzed not worn, and I'm not inworld to actually check. My recollection is that the pos and rot are the same as when PRIM_POSITION and PRIM_ROTATION are used. That's like 5 edits to get rid of typos, I really must get myself a secretary to take dictation, mustn't I?
  4. For starters, you can get the two bits of information a lot quicker by using lists and asking for both bits of information at once, such as list params = llGetLinkPrimitiveParams(linknum, [PRIM_POS_LOCAL, PRIM_ROT_LOCAL]); //This then can be converted to a string bystring details = llDumpList2String(params, ",");//And the string can then be written to the description field for each child byllSetLinkPrimitiveParams(linknum, [OBJECT_DESC, [details]); This method gives you a way of accessing the default position and rotation of each child should you need to set everything back to a sane starting point. But what I recommend you try is making up a strided list of the local pos and rots for each child of the linkset, // declare as a global list allParams = [];// ( then assume numPrims to have been set to the number of prims)for( ii = 1; ii <= numPrims; ii++){ list params = llGetLinkPrimitiveParams(ii, [PRIM_POS_LOCAL, PRIM_ROT_LOCAL]); allParams += params;}// later on when you want to set pos and rot for child thisPrim primInd = thisPrim - 1; // remember list element 0&1 is for prim 1, 2&3 prim 2list posAndRot = [PRIM_POS_LOCAL, llList2Vector(allParams, primInd*2), PRIM_ROT_LOCAL, llList2Rot(allParams, primInd*2+1)]; llSetLinkPrimitiveParamsFast(thisPrim, posAndRot); The messy part occurs because the list elements start from 0, but in linksets, the prim numbers start from 1, therefore the prim number has to be decremented first before doubling it to get to the correct starting point in the list. You can if you want compact all that into the list generation line itself, but it isn't so clear to see what is going on. You could also maintain several lists this way, each containing the prims in different positions, and choose between them
  5. Some simple gotchas to chech... Make sure you haven't ticked the "locked" box on the object tab Make sure the group setting on the general tab is the same as your own group and possibly the land group As a basic test, to rule out complex issues like size and distance, make trwo cubes, standard size, placed 1 metre apart, edit the first one and select the object tab, then holding shift, move to the second and click on it, and see if the "link" button then appears. If it doesn't, go to a sandbox and repeat the test to eliminate parcel-settings.
  6. Objects that the server cannot position get dumped at <0,0,0>, which is not something you can configure, so your're stuck with either moving the nearby location, or solving the problem. If you can right-click them and get an edit box open, I suggest looking to see if there is evidence that the ghost prim is part of a link set. Since linksets are being returned it suggests this. One option might be try editing linked items seperately and detaching it, then deleting it. But it sounds to me as if you need to be investigating the existing linksets to look at them in greater detail. After noting the names of the ghost prims, deleting them, and presumably re-rezzing the distant link set which had been deleted, is the ghost prim still a part of the set, or similar megaprims? Have you, in spring-cleaning, repositioned any of these distant link sets that go when the ghost prims are deleted? I assume there has been a period when this wasn't happening, so there should be some identifiable trigger point where it does begin, and hopefully a clue there Another way of investigating this is to write a script that you drop in the ghost prim to identify the root prim and position, but I have a feeling that since the ghost prim is well outside the maximum linkage range for SL this is going to fail.
  7. You can run scripts within LSEditor to check syntax and some of their funtionality, they obviously won't make anthing move and you won't be able to have axtual touch, collision , moving event triggers. But it does allow you to do some experimenting on your own PC whilst not logged into SL. I bellieve the Eclipse platform also allows for editing and testing LSL scripts, but I have no personal experience of it with which to make recommendations.
  8. Are they part of a link-set, and if so, are non-mesh parts of the set also shifting, or just the mesh?
  9. OK, Try this doStuff0() { // statement } doStuff1() { // statements } doStuff2() { // } then inside the timer() event integer choice = (integer) llFrand(2.0); if( choice == 0) doStuff0(); else if(choice == 1) doStuff1(); else if(choice == 2) doStuff2(); Obviously can be extended to a extraordinary amount of options. Watchout for the gotcha, be sure to use == when you test, if you use a single = you will always take that action ETA Beat Rolig to it by less than 60 seconds, not as slow as I look
  10. Inside the timer event, call any functions you want to call, then, assuming you still want the next timer event to be a random interval, repeat the line which sets it to the range Max - min. In the following example I've deliberately stopped the timer on entry to the event to prevent it firing up and queuing up an event should one of the called functions go on for a bit longer than expected. Timer() { llSetTimerEvent(0.0); DoStuff1(); DoMoreStuff(); DoStuffTillTheCowsComeHome(); llSetTimerEvent(next duration); }
  11. I remember the Indian Mumbai call-girl spam all too well. Much as I love Prince Philip-isms, I think the thread has driffted a little too close to the rocks of racism.
  12. You have to think of your numbers as powers of 2. 1st bit set = 1 2nd bit set = 2 3rd bit set = 4 4th bit set = 8 5th bit set = 16 Note that the number is doubling each time So to set the 3rd bit in the integer to be sent, the sender does number = number | 4; // 4 = 2^3 Note that OR is used to turn on the bit regardless of what it's value was. The number is then sent. And the recever tests for bit 3 being set by tVal = number & 4; Here, tVal will only be TRUE if the 3rd bit in number has the value 1 You could therefore declare a whole set of integers integer bit1 = 1; integer bit2 = 2; integer bit3 = 4; And use those instead of magic numbers, which would then give the following way of testing a received number so see if bit 3 and bit 5 were both set: if( number & (bit3 + bit5) ) { }
  13. There is some drift, it's even worse when rotating objects, such as in a large pendulum. All I can suggest is that at the end of each keyframed movement you then use llSetPos() ands llSetRot() to get your object to the precise position you want it. From my own moving objects, such as said pendulum and a funicular, I see the problem comes with the moving_end state, the way this gets triggered suggests to me that the server is struggling with detecting exactly when an object stops, and has a "good enough" algorithm that doesn't really suit all cases.
  14. You have missed the letter "e" out of the test clause for page 3, it is there as KioPag3.
  15. It's a bit of a dirty-trick, but thisd might persuade the arrivals to fly: Make the landing point a circular prim 10 metres in diameter, 300 metres above the ground. Leave it solid whilst you set it up and assign the arrival point location, then turn it to phantom. A refinement would be a few floating signs on the way down urging them to press PageUp or start flying now.
  16. You're on the right track... just need a few detail changes. Try this approach. (You might also want to have days, since your value chosen is 48 hours.) Set a counter to the number of seconds until the gift is to be awarded. Set the timer to 1.0 ( or 60.0 if you only want to update every minute) Inside the timer event, decrement the counter, and if it is not zero, convert it's value into days, hours, minutes, seconds in a string, and set this string as the hover text. ( Hint, counter value / 3600 for hours, take Mod of it by 3600 to get remainder, divide that by 60 for minutes, mod 60 for seconds.... ) If the counter is zero, set the timer event to 0.0, alter the hovertext appropriately, and issue the gift.
  17. And is it a coincidence that yesterday a couple of offline IMs finally made it out of the servers and into my email inbox? Thanks for voting.
  18. I am so relieved to hear it isn't just me, and I don't have to re-install Windows/start using the V3 viewer/speak to my modem supplier/re-install TCPIP/more of the unusual suspects... Or even humiliate myself by posting details of the antiquated machines I run SL on here in the carrot-crunching sticks So I guess this is where I have to make a bot then try and teach one of the cats to watch the screen and come fetch me when an IM comes in.
  19. I don't use any of those managed email services, and it looks like all of my *cough* alts with their different email adresses also stopped receiving offlines at around the same time, which seems to be close to the second set of rolling restarts on Tuesday.
  20. The last offlines I received in my email accounts are dated February 3rd, but I know from the login message this morning that I should have received at least 12 during the past 48n hours. Has anybody else seen this?
  21. A screenshot would be of great help, but off the top of my head, something in the house recognises you as the owner and is listing lots of UUIDs, into local chat. If it is indeed local chat. If so, what you are seeing filling up the screen will be lots of lines of the form "name of object: what object is saying". You can hunt around for the object name and try touching it to see if you get a menu for reporting or going silent. I love the smell of hypotheses first thing in the morning.
  22. If you had been using local textures (ones stored on your PC), they probably won't survive a relog, but you should be able to re-apply them as local textures using the same process to avoid having to upload until you are ready.
  23. Almost all the door scripts of that type rely on the prim they are contained in being modified by a path-cut that effectively removes all portions of the prim to one side of the central Z axis. If you want to rotate a more complex prim such as a sculpt or a mesh in a similar way, you are either going to have to look at the puppeteer approach, where you record the prim relative position and rotation and replay the movements, or you are going to have to look at a method mentioned in the mesh forum, whereby an extra portion can be added to the mesh but hidden. such that there is now an axis to the prim which appreas to be on one visible edge of it. (Editied to correct my legendary typing)
×
×
  • Create New...