Jump to content

Wandering Soulstar

Resident
  • Posts

    421
  • Joined

  • Last visited

Everything posted by Wandering Soulstar

  1. That is why I used the collision_start as simply the catalyst to start the sensor. It is the sensor that tracks who is in the space of the lift, not the collision events. There area lot of other problems with the start/end events and situations where they do not fire, making them unreliable (in my view) for tracking how many people were in the lift.
  2. Trying to think this through, and about to board a flight, so will have more thinking time, but for now, without introducing a third 'server' prim, that does not go offline, I cannot figure out the solution to them both going offline at the same time and changing URL at the same time. You could have third object, just used as a dumb storage system/registry ... though have to think through how to maintain constant comms there as well .. very interesting exercise you have given @Wulfie Reanimator
  3. I had this same requirement in the elevator scripts I wrote recently. The posted solution in the Library worked somewhat, but I updated and should as well update there but ... I have single prims that are in the space the elevator occupies at the top and bottom (only a one stop elevator). This has llVolumeDetect set TRUE. When it gets a collision it sends a message to the Main script (which controls the lights). The Main on being advised of the collision sends a message to a separate Sensor script (same prim as Main), and turns on the lights (if not already on). The Sensor then sets a llSensorRepeat to check every second (if not already on). As long as it detects anyone it lets the Main know how many. If it gets a no_sensor event it turns off the sensor and advises Main that no one is there. When the Main is advised that no one is there, it turns off the lights.
  4. Thanks to a pointer from @Wulfie Reanimator in another thread, saw how to make this more user frindly. The above code was showing the full link, whilst the below just shows an underlined word! string gName; key gUser; default { touch_start(integer total_number) { gUser = llDetectedKey(0); gName = llDetectedName(0); llListen(5,"",NULL_KEY,""); llRegionSayTo(gUser, 0, "Select your Option (click on underlined text):"); llSay(0, "Option 1: [secondlife:///app/chat/5/one One]"); llSay(0, "Option 2: [secondlife:///app/chat/5/two Two]"); } listen(integer channel, string name, key id, string message) { llSay(0, "Option Selected was: " + message); llSay(0, "confirm id & name"); llSay(0, "id: " + (string)(id == gUser)); llSay(0, "name: " + (string)(name == gName)); } }
  5. Hi Zurcon, First off .. Land that is marked 'Abandoned' is not available for sale, it is precisely that, abandoned. LL will put it to sale if a ticket is opened, but normally (99%) only if you already own adjacent or in the same sim land. The channels for by land are Reseller (as you call it) or Auction .. that is how the land market has worked for years and years, so you are 'stuck' with it. As to costs .. the initial cost will be off course up to the seller of the the land and can range from very low (ex L$ 0.5 p/sqm) to stupidly high (have seen higher that L$100 p/sqm). What is going to be just as important to you is the tier you have to may monthly. Once you abandon your Linden home, the first 1024 sqm is free, but after that you will have to pay additionally to LL each month (see the land pricing page HERE) .. if you do group land ownership you'll get a 10% bonus on this .. happy to explain how that works if you are interested. Hope this helps. Wanda
  6. Hi All, I was looking to see how to get a clickable teleport output in a chat message (Topic HERE) and @Innula Zenovka pointed me to the following Wiki entry (Viewer URI Name Space) which did the trick. I saw that this gave a lot of options for things that could be done and one that jumped right out was the \app\chat option. I realised that this gives us a way to give the user options, in chat, that can then go back to our scripts. This could be very useful when we have a dynamic set of options for the user, some that may be longer than the text available in a button, and much simpler than having to write all the code for a dynamic, multi-panel, dialog. I created the following code snippet to test: string gName; key gUser; default { touch_start(integer total_number) { gUser = llDetectedKey(0); gName = llDetectedName(0); llListen(5,"",NULL_KEY,""); llSay(0, "Select your Option (click on underlined text):"); llSay(0, "Option 1: [secondlife:///app/chat/5/one]"); llSay(0, "Option 2: [secondlife:///app/chat/5/two]"); } listen(integer channel, string name, key id, string message) { llSay(0, "Option Selected was: " + message); llSay(0, "confirm id & name"); llSay(0, "id: " + (string)(id == gUser)); llSay(0, "name: " + (string)(name == gName)); } } And the results were exactly as I hoped: To make it more like a dialog, instead of using llSay in the initial 'dialog' we can use llInstantMessage or llRegionSayTo .. and as well set the listen to listen just to the AV that has clicked. Just thought I'd share 🙂
  7. Just to close out .. Innula pointed out exactly what I was referring to .. so that I could construct: llOwnerSay("There was a problem at [secondlife:///app/teleport/region/x/y/z]"); which then in chat gives me : and clicking the link allows me to teleport directly to said location. There is a whole world of things that you can do here, havw now saved a bookmark to this one. Thanks again @Innula Zenovka
  8. Thanks @Innula Zenovka that was exactly the page I was looking for!
  9. Hi all, Sorry for the basic question, but I am stumped. In my current project, and a few points I will be sending text to a user (llOwnerSay) where parts of the text will give them an in-world location (region-coords). I could swear I saw at one point in the Wiki ,or here perhaps, a way to format that, or add specific things to it, so that they would be able to click on it and it would bring up the map allowing them to teleport to the location ... is that correct or was I just dreaming it? If it is possible .. can anyone point me to the wiki page that describes how? Thanks!!
  10. Good to know and something I did not know .. Thanks @steph Arnott
  11. @steph Arnott I realise that it is not a true constant as LSL does not provide that functionality. In coding though I treat it as such, i.e. by the fact that the variable name is in CAPS it means the value will not (should not) be changed once set the first time, i.e. in the header declarations. My point was that by declaring such a 'Constant' and then using it when we need to pass "" we ensure that we do not, by simple slip of the keys, pass a space by mistake. On another note ... I noticed the following line in your code: llSetMemoryLimit(llRound(llGetUsedMemory( ) * 1.10) );//no need for 64k. 10% added. I understand that this limits the amount of memory the script is allowed to use, but not clear on what that means at the sim level? If I have a bunch of small scripts, which I know will not ever exceed a certain k of memory, does setting this 'free up' additional space on the server for other scripts?
  12. Not sure how you want to sort them .. but the Wiki gives pretty clear direction on dealing with inventory ... start HERE
  13. This is one reason that I declare a constant: string EMPTY_SPACE = ""; and then use this constant wherever I need "", keeps these hard to find errors from happening 🙂
  14. One thing to keep in mind, all group checks in LSL will only be checking the currently active group for the Avatar, there is no way to determine what non-active groups an AV belongs to.
  15. Thanks so much @Pierre Ceriano !!! I am truly a basics amateur when it comes to using GIMP (or any graphics design tools) and the ponter for the paint brushes was precisely what I needed and learned a whole new aspect to GIMP.
  16. Hi All, I need to make some cracked glass textures. GIMP (2.8) is the tool I use for textures, and where the existing panes of glass that I want to put random cracks into were made. I have looked, but not found so far, to see if there was a filter/function in GIMP that would give me a cracked glass effect .... So .. anyone out there have a suggestion for how to do this in GIMP? Thanks! Wanda
  17. @Rolig Loon @Love Zhaoying Reading through the Wiki found there is a very simple way to find when the physical object stops moving ... the moving_end() event fires when it stops 🙂
  18. @steph Arnott You are right .. my apologies for the snarky comment in regards to the spelling. That was uncalled for. I will have to insist though ... I do clearly understand the use of the || (OR) operator and how Boolean logic works. I was a professional programmer for 8 years and some of the applications I have written are still being used by major companies. I did not say that || was not a logical test, what I said was that the conditional statement: var == blah || blab does not in C, C++, Java, FORTRAN, COBOL, SQL, PHP, Pascal, Object Pascal, Basic, Object Basic, Visual Basic, VBA, or LSL ... evaluate the same as var == blah || var == blab ... claiming that is does goes against all the basic rules of Boolean logic. And I presented you with the code to test this above .. if you do not believe me, copy it as is and run it in world.
  19. @steph Arnott While I accept that everyone can have their opinion, to my understanding this forum is for all of us to help each other when it comes to scripting in SL, by providing constructive feedback and guidance. Although your initial comment ... ... threw me for a bit of a loop, I was interested in understanding where it was coming from. Although I have been coding for over 20 years, I know I can always learn something new. yet when pressed for feedback, you never said why it was 'flawed' (and in fact does work perfectly in-world). As to the 'over-bloated' comment, you managed to come back with three examples: (1) As I explained . agreed I do not 'need' them, but explained that there is a method to the madness, and I have it ingrained in me to follow guidelines when coding. (2) Here at first I thought you were pointing out a short-hand that I did not know exists, but it did seem strange to me. In none of the many languages I have coded in did that kind of conditional statement make sense. In every other language that would be interpreted as 'check if action is equal to blah OR if blab (i.e. is blab TRUE). But LSL being what it is I thought perhaps this was interpreted differently. So I wrote a test script (below) and much to my (non)surprise, what you suggested was completely incorrect: default { state_entry() { string sCONST_1 = "a"; string sCONST_2 = "b"; string sCONST_3 = "c"; string check = sCONST_3; llSay(0, "Answer should be False in all cases"); llSay(0, "check == sCONST_1 || sCONST_2"); if (check == sCONST_1 || sCONST_2) { llSay(0, "Answer: True"); } else { llSay(0, "Answer: False"); } llSay(0, "check == (sCONST_1 || sCONST_2)"); if (check == (sCONST_1 || sCONST_2)) { llSay(0, "Answer: True"); } else { llSay(0, "Answer: False"); } llSay(0, "check == sCONST_1 || check == sCONST_2"); if (check == sCONST_1 || check == sCONST_2) { llSay(0, "Answer: True"); } else { llSay(0, "Answer: False"); } } } Console Output (LSL Editor) new: Answer should be False in all cases new: check == sCONST_1 || sCONST_2 new: Answer: True new: check == (sCONST_1 || sCONST_2) new: Answer: True new: check == sCONST_1 || check == sCONST_2 new: Answer: False so your comment: actually gets turned around .. apparently you do not understand how Logical conditions work. (2) The next area was around certain list constants that I had defined: to which I pointed out that in the way the lists were used a stride list would have made no sense. To which you followed up with: ... which did not make much sense to me, and though I tried to explain why I was doing it the way I did, you only response was that .. though without an explanation I highly doubt I will, and if what you are hinting at is along the lines of the previous 'direction' as to the use of OR in conditionals .. well you can imagine I am a bit skeptical. So, my take away from this is that if you feel that ' trying to read it is a headache' and 'it is three times lomger than needed and damned hard to read', perhaps the problem lies somewhere else besides my code. One final suggestion: The forum does have spell check, and puts a nifty red squiggly line under misspelled words. It only takes a second to correct these (words in RED above directly quoted/copied).
  20. If you would be so kind as to show me an example I'd appreciate it.
  21. Right ... and as I said .. set these as constants in the header for easy of locating should I want to change the values they contain .. intensity etc ... otherwise could of course have the 'hard coded' in the method itself.
  22. You have me confused on this one still. What 'function' is already a list? These are lists of parameters, which are passed to llSetLinkPrimitiveParamsFast. As I said they could just be in the code but I made a conscious decision to have them in the header so it would be easier to find them to adjust. What I did not know was that you could write: var = val1 || val2 .. had not come across that shorthand before.
  23. @steph Arnott Regarding the lists ... if you'll look to where they are used (below) you'll see that a stride list would make things more complex. These are parameters passed to llSetLinkPrimitiveParamsFast, not clear what LL function you are referring to though. Given I could have just placed this directly in the code, but I set as constants for ease of adjustment, one easy place to go to adjust this type of thing rather than finding them in the code (one is reused as well). set_doors(string action) { ..... //if we are opening, and night .. set light to full if (action == DS_OPEN && sun == NIGHT) { llSetLinkPrimitiveParamsFast(LIGHT_SRC_LINK, LGT_P_FULL + [PRIM_LINK_TARGET, LIGHT_TUBE_LINK] + LGT_GB_ON); } ... //if we are closing set ligths if (action == DS_CLOSE) { //defult to off list params = LGT_P_OFF + [PRIM_LINK_TARGET, LIGHT_TUBE_LINK] + LGT_GB_OFF; //if night and someone is in set to dim if (sun == NIGHT && llGetListLength(gPaxList) != 0) { params = LGT_P_DIM + [PRIM_LINK_TARGET, LIGHT_TUBE_LINK] + LGT_GB_ON; } llSetLinkPrimitiveParamsFast(LIGHT_SRC_LINK, params); } } } I was not aware of that shorthand ... good to know and will use going forward ... In the case here I do tend to agree, this is just a practice I have fallen into from the situation where a same function code could come from different channels and needs to be acted upon differently. Sorry to have caused a headache 😉 , was not my intention. Most of the complexity came from two sources ... first was how I tracked Pax entering/leaving etc ... as posted above am looking at doing that a different way that looks to simplify things. Second is all the code around the malfunctions and results of that. While not necessary for the elevator to work, it was something 'extra' that I wanted to add. Agree that in many areas I might have simplified the code, but even in the simplest of scripts I try to follow the same guidelines. Back in the day had hammered into me that consistency in form when writing code was paramount as it ensures that code can be maintained and expanded. So I do tend to be a bit verbose I admit.
  24. @Rolig Loon You hit the nail on the head .. whilst on the tube this morning realised there was a better way to deal with the AV tracking, and generally avoid the user clicking to sit on the invisible detector prim. As well will allow me to move the move code into the main as the elevator will no longer need to listen for calls from the detector whilst in-motion.
  25. @steph Arnott I definitely appreciate constructive criticism, am always looking for ways to optimise, and so would appreciate understanding where/why you consider it 'over bloated' and particularly why you consider it 'flawed'.
×
×
  • Create New...