Jump to content

Wandering Soulstar

Resident
  • Posts

    421
  • Joined

  • Last visited

Everything posted by Wandering Soulstar

  1. Hi All, Hope that someone can lend a hand here. I have been going around in circles with this for the past couple of days and at this point feel that my head is going to explode. What I want to do if determine the distance from the center of a prim to the furthest point of the prim along a particular world axis. With prims that are at zero rotation, or only rotated 90/180/270 on any axis it is simple. If I want the distance along the x-axis, for example, Zero Rotation it would be 1/2 the x size; rotated 90/270 on y it would be1/2 z size, and 90/270 rotation on z would be 1/2 y size. The problem I am having is when there is a non-right angle rotation on an axis .. or even more, when there is a rotation on more that one axis. The size no longer is all I need as the furthest point becomes an edge/corner not the face. I have tried multiple ways of figuring this out, but it has been way too many decades since I studied trig. Have some half solutions, but these are based on too many variables and having to check what is rotated where etc that I know there must be a simpler mathematical formula for doing this ... so hoping the math wizards out there could lend a hand. Thanks in advance! Wanda
  2. Which is what I said in the sentence (disclaimer) under the code @Innula Zenovka 😁
  3. OR you could set your listen to filter (listen) for just that word: llListen(PUBLIC_CHANNEL, "", NULL_KEY, "word"); Then you would not need the conditional check in your listen event, and said event code is not firing constantly when people are speaking nearby .. you do lose the flexibility that Rolig's method hase, my example will not hear 'Word', 'WORD', 'word ' etc., nor will it hear it as part of an overall statement ... only 'word' And Rolig's statement regarding the load and lag is very, very true. You might want to pair this with some sort of sensor so that the object only starts to listen when someone is withing chat range (20m).
  4. Have had something similar with a HUD I created .. tried to track it down and finally gave up
  5. Brilliant! Thanks @Beq Janus .. and a perfect explanation in the article!
  6. @Beq Janus In regards to what you have shown above .. I too was under the impression that MS would not 'work' with texture faces that were planar .. that these would not transfer when we meshed things .. this was something specific in the MS documentation back when I started using it years ago .. and I have stayed away from planar ever since .. painstakingly aligning textures with texture align patterns rather than the simple function provided in the build tool using planar ... So what you are say is that now I can use planar, and MS will create the resultant mesh in accordance to this so that when I upload all I have to do is set the texture to the face and nothing else?
  7. Good point .. now just to remember it going forward 🙂
  8. Actually Rolig, if the other script is sending emails this architecture makes sense, llEmail causes a script to sleep for 20.0 seconds
  9. There is nothing in the script that you posted that could make an object disapear (and next time please post in the code window .. the <> button .. makes it much easier to read). There looks to be another script in the prim though .. this script gets a link_message, which can only come from a script in the same prim or another in the linkset,. The other script seems to be receiving emails. The reason I assume this other script is in the same prim, also means that there is not a way to force the key .. from the code above: on_rez( integer status ) { key kOwner = llGetOwner();  llInstantMessage( kOwner, "My object key has likely changed. Please make sure that all client terminals are set to access the following key:"); // modified by Ordinal Malaprop 2007-05-27 // as it was saying the wrong key llInstantMessage( kOwner, (string)llGetKey() );  init(); } the important line is the one with llGetKey(), which gets the unique key of that prim, and which the serves then use as the email address to send their emails to .. from the wiki (llEmail definition):
  10. @Innula Zenovka I Missed your comment under the code window .. I had read over the Wiki, but to be honest misunderstood that part .. but that raises an issue that I'd like to test in-world because it does not ring correctly, and if it has been implemented as such would have thought that it could have broken tonnes of script systems out there. Previous default behavior - click on a child prim with a script containing a touch event handles the touch, and the event goes no further New(?) default behavior - click on a child prim with a script containing a touch event executes the touch AND the touch goes to the root prim as well if it has a touch event. So if I had a panel with a few buttons and wanted something to happen when I clicked the buttons and something else to happen when I clicked the panel .. in the change this would have broken as I'd get the action in the button click and the panel when I clicked a button. So if this is the case .. then correct, only need to check if the clicked prim is unlinked or the root and away we go .. no need for llPassTouches ... though will have to remember this default behavior going forward <sigh>
  11. @Innula Zenovka Nope that would not work in the scenario .. I do not want the script to do anything with the linkset .. I want it to act in the prim that was clicked, and if a linkset a click anywhere in the linkset needs to throw the touch-event in the root, so that the script in the root is the one acting (there is a lot going on in the actual code) Looking at it again with fresh eyes I figured out how to get the behaviour I wanted .. and it was staring me in the face: state_entry() { llPassTouches(PASS_ALWAYS); } touch_end(integer total_number) { //only act if unlinked or the root if (llGetLinkNumber() < 2) { //do stuff } } Setting this to PASS_ALWAYS should work fine. If the prim is unlinked, there is no one else to receive the touch .. so no big deal, and if it is linked and the root .. well, the pass of the ouch is always to the root, so it would not pass to itself ... problem solved 🙂
  12. Sorry but you misunderstood the scenario (bold emphasis added) A simple description (script quite obviously does a lot more) .. when the prim is clicked the script changes the colour of the prim. but if I link the prims, and click on the child, I do not want the child to change the colour (execute the code in touch_end) .. I want the root to do it. @Rolig Loon just ignoring the click of the child would not fire the event in the root, which is what I want to do @Kyrah Abattoir there is no constant root prim .. this is a build tool script that goes into the prims created for the build (of a house for example). As we build they are unlinked, but will begin linking them up, with the tool script remaining in the linked child prims until the build is done.. and thus the need for the functionality
  13. Hi All, Have a question in regards to passing touches from a child to root. Scenario: Two unlinked prims .. each with the same script in them that does something in the touch_end event. If they are linked though I only want the script in the root to react. Now I know I could do it this way: changed(integer change) { if (change && CHANGED_LINK) { if (llGetLinkNumber() > 1){llPassTouches(PASS_ALWAYS);} else (llPassTouches(PASS_NEVER);} } } touch_end(integer total_number) { if (llGetLinkNumber() < 2) { //do stuff } } what I am wondering is if there is a way to simply do this in the touch_end, so that the changed event is not constantly firing .. something like: touch_end(integer total_number) { integer link = llGetLinkNumber(); if (link > 1) { llPassTouches(PASS_ALWAYS);; } else { llPassTouches(PASS_NEVER); //do stuff } } Does anyone know if this would work? Can't get in-world for the next few days to test myself. Thanks! Wanda
  14. Thanks Beq! That was what I was hoping .. back to LSL Editor 🙂
  15. Hi All, I have a question that I hope someone can help me out with. I am going to be creating an item, in-world with prims, that I'll then turn to mesh using MeshStudio. Before you jump in with 'You should use Blender', I do realise this, but for now I have not had the time to sit down and learn how this works, so please .. just the question at hand 🙂 The following scenario is an extremely simplified version, but hopefully explains where my question is: Two prims, joined together. On one of the faces (call it ID Face) I'll assign a texture where the top third of the texture has an Y in the middle, the middle an N, and the bottom third is blank I'll set the repeat to 0.3333 vertical, and set the offset so that the Y half is showing Then will create the DAE with MeshStudio, upload and apply the textures Now my question: I'd like to be able to 'toggle' the ID face between the Y, X, and Blank. Can I do this by changing the offset of the face? Would I need to change anything else (repeats for example)? I could test this in-world, but due to RL it looks to be some days before I can get in, and would like to continue forward with my scripting project in the interim. The answer here makes a major difference to how my project is designed and coded. Thanks in advance!! Wanda
  16. Good catch @Rolig Loon I missed the 'linked' reference in the OPs statement (and did not look into the routine for moving the door where it would have become very clear)
  17. Yes fairly simple. Just modify the script so that in the state_entry it listens to a particular channel., an d on the touch whisper so that the paired door starts as well: //Comms channel .. set to unique value for each pair set integer PAIR_CH = -12345; default { state_entry() { //filtering for single message llListen(PAIR_CH, "", NULL_KEY, "touched"); } touch_start(integer total_number) { llWhisper(PAIR_CH, "touched"); doOpenOrClose(); } listen(integer channel, string name, key id, string message) { doOpenOrClose(); } }
  18. @steph Arnott ... chibiusa was agreeing with you ... just missed a comma ... what the sentence start should read is: There (is) no roundabout way, we ARE funding Sansar. With the addition of the comma the phrase is separated and so in agreement.
  19. That would explain a difference in the output .. but not the math ... the code is adding 0.1 float + float .. and the comparison is to a float. It shows that if we add 0.1 three times .. then subtract 0.1 three times .. we do not get back to zero .. as we should. I understand losing precision based on deep decimals .. but really, this is pretty basic math ...
  20. Wow! Just tried myself and go the same result ... yet if you switch to alternating adds/subtracts Y += X; Y += -X; Y += X; Y += -X; Y += X; Y += -X; it tells you that it is equal to .. as it should ... no idea though what is happening.
  21. Sorry Steph .. then I must have misunderstood what you meant by occupant pads ... how does that work?
  22. That works if you only want to turn on/off the lights when an AV 'sits'/'unsits' but does not if you want to set the lights, or other things, based on them being in the space of the elevator. Closing doors for example when the elevator is empty.
  23. To Steph's point .. could you not use llEMail to update the URL should both be in regions that reset at the same time?
×
×
  • Create New...