Jump to content

Phate Shepherd

Resident
  • Posts

    214
  • Joined

  • Last visited

Posts posted by Phate Shepherd

  1. 3 hours ago, Rachel1206 said:

    Fascinating - I remember, I saw it on an episode of BBC's QI and was amazed by, this is how natures "made" the turtle shield. See also Wikipeda on Gömböc

    Thank you for sharing your creation @chrixbed

     

    Unfortunately, that video is blocked for me. Not sure if it was a QI clip or not, but love the show. I was a little unsure of how the transition from Stephen Fry to Sandi Toksvig would go, but I like her every bit as much.

    I only recently heard about Gomboc from an action lab video.

  2. What if you rigged the cape primarily to the extended bento avatar wing bones (Secondarily to the chest/abdomen). For a default animation, you could have a high priority wing bone animation hold the cape behind the shoulders, allowing regular animations to move the arms freely, but when playing animations that you create, the wing bones could follow the arm bones and possibly create an over the shoulder draped look. Weighting that would be nightmarish though.

  3. So i have this function2 that pre-processes a string as part of a much more complex function1. What I have noticed is that calling the function2 is faster than inlining the function2's code in function1.

    Is this my imagination, or are there possibly optimizations in the Mono compiler that favor short functions over doing similar in-line in a much larger function? I know that some traditional language compilers will go so far as to assign frequently used variables in a function to processor registers, favoring short functions. Also smaller functions fit in smaller processor caches... but I can't imagine Mono taking advantage of either?

  4. You could use a prim animator, and it might accomplish what you are looking to do.

    There may be another way to do it that might be more realistic, but I'm not sure how wise it would be to go down this path. Basically it involves rezzing a copy of the item to explode, and having it set temp rez and physical. Then a script inside it would make sure it is physical, and temp rez, and unlink it. The act of unlinking a physical object can make for a nice explosion, especially if the prims overlap slightly. It does require that the owner grant permission to the object before it can unlink itself. Lots of testing would be needed to make sure you aren't making a litter bomb.

    I haven't tested the scripted form of this, only the manual version of doing this: Selecting an old style house made of prims, setting it temp-rez and physical, and then clicking unlink..... BOOM!

  5. 3 hours ago, Tattooshop said:

    It works! Thank you so much! :D

    
    
                vector colour;
                colour = (vector) msg;    // sensible to use string trim on this
                if ( colour != ZERO_VECTOR) 
                {
                    llSetTimerEvent(0);
                    RGB = colour;
                    partSystem();
                }

     

    As Profaitchikenz Haiku mentioned, if black will be a valid option that someone might want to use, then a more complete test could be done...

                // Break up the vector to verify it has the proper number of components
                list v = llParseString2List(llStringTrim(msg, STRING_TRIM), [" "], ["<", ",", ">"]);
                if ( llGetListLength(v) == 7) 
                {
                    llSetTimerEvent(0);
                    RGB = (vector)llDumpList2String(v, "");
                    partSystem();
                }

     

    • Thanks 1
  6. 31 minutes ago, Fritigern Gothly said:

    So you want to rely on external services to make your pointless point?
     

    Poster was discussing gathering client diagnostic information, client IP, etc.  If they happen to go down the path of obtaining that information, to avoid presenting that information to others. Nothing more than that was intended by the post.

     

  7. Yes, there are no LSL commands that expose that information directly. However, there are a few viewer features that are enabled by default that will expose that information in concert with an external server. I only mention it as one of the thread participants was discussing collecting various diagnostic information, and I wanted them to be aware that displaying any identifying information, even without any bad intentions, could run afoul of the TOS.

    Do you recall the RedZone fiasco some years back? It took advantage of these loopholes to collect visitor IP addresses. It also had a web page you could visit, put in an avatar name and it would list out all other avatars that shared that IP address... and obviously, IP addresses typically resolve down to a city, if not an even smaller geographic area.

  8. 2 hours ago, Mollymews said:

    what we can do is store the start_param in a persistent store like the object description field: http://wiki.secondlife.com/wiki/LlSetObjectDesc

    then reset the script. Retrieving the start_param from object description in state_entry event. http://wiki.secondlife.com/wiki/LlGetObjectDesc

    Be mindful to not use link number 1 for this on attached items. If I recall right, link 1 cant have its description or link name changed by a script while attached.

    • Like 1
  9. One thing to be mindful of when doing resets on anything that is attached or sat on is to re-aquire run-time permissions like PERMISSION_ATTACH and PERMISSION_TRIGGER_ANIMATION after the reset if used. I quite often check in my state_entry event to see if the object is attached, and if it is, request PERMISSION_ATTACH again. This not only makes the item resettable while worn, but it lets you edit the script while worn, and not trigger permission errors when you issue a llDetachFromAvatar().

    On the other hand, for items that use PERMISSION_TRIGGER_ANIMATION, I frequently reset the script when the avatar stands up, prepping it for the next person, rather than resetting it when they sit.

    As Rolig said, there is no one-size-fits-all approach to how a script starts up. There are so many little gotchas here and there, it can be a long time to instinctively know what will work best.

    • Like 1
  10. 5 hours ago, Mollymews said:

    this is most likely my problem. When my bike first moves then rate maybe less < 0.01

    what I am doing is adjusting the omega spinrate to the size of the wheel. On the basis that a little wheel performs more revolutions than a bigger wheel over the same distance. My calculation of this might be all wrong
     

    
    // approximate circumference (rim) of wheel in metres
    // idea is that a smaller wheel will perform more revolutions
    // than a larger wheel over the same distance
    
       vector s = llGetScale();
       s.y /= 2.0;      
       float rim = llSqrt(s.y * s.y);  
    
    // spinrate is calibrated to size of wheel
    // dir is either 1 or -1. FWD or BACK
    // AXLE is <0.0, 1.0, 0.0>  Y-axis
    
       float mag = dir * (llVecMag(llGetVel()) / rim * TWO_PI);
    
       llTargetOmega(AXLE, mag, 1.0);

     

    Mm, I'm sorry... I can't resist 😉

    float rim = llSqrt(s.y * s.y);

    (Note: I would have to play endlessly with the formula until I got it right, so, I don't claim any mathematical high ground!)

    • Like 1
  11. Should also be able to set it to group, with shared perms, to allow other group members to view/edit the contents of the box? Should be able to put them in a role that allows editing. Has been ages since I have set up roles though.

    • Like 1
  12. 34 minutes ago, Madelaine McMasters said:

    It's been ages since I've scripted a dialog, but aren't the button labels 24 chars long, only the first 12 of which are displayed? Pad the button name out to 12 characters with spaces, then tack on something unique after that to differentiate the returned message text.

    It can be done, but dialog buttons don't display 12 characters every time. It depends on the individual character width. For Example, you might only be able to show 10 characters of "WWWWWWWWWWWW" but many more in a string full of "i" characters. Padding with a bunch of spaces, followed by a hidden message also forces the text in the buttons to be left justified instead of centered.

    • Like 1
×
×
  • Create New...