Owner or Group Scripts in LSL

This is just a quick post on an issue that is easy to overlook in making touch scripts work only for the owner or a group. If for example, you set an object to no group, that should include everybody – but it doesn’t! If, for example, you want a door that can be switched to owner or group only on certain occasions by altering its group, but at other times all people (no group) should be able to open that door simply by altering its group back to none, anybody who has a group selected will not be able to open the door as expected.

Try this:

    touch_start(integer touched)
        if (llDetectedKey(0) == llGetOwner() || llSameGroup(llDetectedKey(0)) == TRUE )
            llSay(0,"This works if you are the owner or in the same group. However, if you the object is in no group and you activate one of your groups, it will react counter-intuitively as though you are not in the same group as it.");

Here is a script that enables you to run the relevant tests:

    touch_start(integer n)
        if (llDetectedKey(0) == llGetOwner()) llSay(0,"Owner");
        if (llDetectedGroup(0) == TRUE) llSay(0,"Same group - test one");
        if (llSameGroup(llDetectedKey(0)) == TRUE) llSay(0, "Same group - test two");
        if (llSameGroup(NULL_KEY) == TRUE) llSay(0,"No group");

Here is the solution:

    touch_start(integer touched)
        if (llDetectedKey(0) == llGetOwner() || llSameGroup(llDetectedKey(0)) == TRUE || llSameGroup(NULL_KEY) == TRUE) )        {
            llSay(0,"This works if you are the owner or in the same group. If the group has no valid key i.e. the object is in no group, you can now operate the script even if you have a group enabled.");

Sometimes simple things are worth documenting too 🙂

Notes on Ruth2 settings (edited)

Starflower’s usual appearance (no mesh body). Skin is Eloh Eliot’s Wrath (LE) from Seven Deadly Sins. Somewhat punky today. Standing on the sea bed. No distractions here!
Starflower’s twelve-year-old “makeup all over my face” look with a mesh body. This needs needed to be fixed before I can could use Ruth2.

In the use of mesh avatars, I have come late to the party. I’d been meaning to try it for ages but I’d simply avoided the effort until lately when I felt slightly shamed when appearing in photos for Thirza Ember’s amazing Hypergrid Safari. I am her latest fan – I am sure she has lots. She is REALLY nice.

However, it’s going to take me a lot longer to migrate than I had expected. The feet and hands are loads better – probably the biggest “tell” that somebody is or isn’t using a mesh avatar. Surprisingly, there were some initial disadvantages for me but I resolved these. The settings appear to be rather different.

The head was really different. I simply couldn’t just migrate my shape settings directly. The chin is was smaller to the point of overbite, the eyes less normally or naturally sunken, i.e. slightly bulging with too little eye sockets, making makeup bleed out all over my face. The cheekbones seemed lower and the ears are clearly were different too. I will need to make changes and assess whether or not I can use the Ruth2 head and still look like myself. It currently makes made me look rather like a twelve year old. I no longer look characteristically like myself. This, I think, is the main thing I need to resolve by spending time altering the settings to approximate my current facial appearance.

[Ed.] Modifying the sliders does seem to have resolved my issues with the head. The settings are NOT the same as those required for the system avatar. You will need to tweak yours, as I did. Here follows a guide to what I had to do to approximate my system avatar appearance with Ruth2. (Your avatar may be different, so this will be purely as a guide to what you may need to do in achieving something similar.)

body fat +10

egg head -20
upper cheeks +20
cheek bones +20

eye opening +30
eye depth -10
eye bags +10

mouth corner +10

chin angle -10

torso muscles +20
shoulders +10
love handles +10
belly size +10

butt size -20
saddle bags -10
foot size +35

The hips were massively wider. I had to lower the sliders by 10%.

[Ed.] It now seems that it was not the hips but “saddle bags” and “butt size” combined with low “love handles” and “belly size” settings that made the hips look large.

The feet are great but they no longer work with my shoes. They are smaller even than the zero setting that I was previously using on the system avatar, so I may have had to experiment with the foot position settings, which appear to allow different angles, as well as increase the foot size to fill my shoes. Again, if I can’t wear my shoes then this is going to be rather difficult to sustain. [Note: different angles don’t work, as has been pointed out to me, as this makes the angle of the shoe change as well as the foot.]

[Ed.] After some more experimentation, it is possible to modify my shoes. The strange heel-in-foot thing of the system avatar wearing system shoes with heels > 0 is no more, thank goodness. You may need to use existing transparent system shoes as previously, as I did, or use the ones supplied in the Ruth2 Extras package (although altering the hover height of your avatar by about 1-2 points, depending on your shoe height, will have a similar effect). I am guessing that mine are something like the equivalent of 3″ heels in RL: these are 100 on the slider, even though I used the medium rather than the high foot. (I’ve also done some flat shoes with the flat foot.) The shoe mask will no longer be required. Obviously I had to reposition the shoes to make sure that no bits of feet showed through (and I had to widen the circumference of the straps slightly, but this is specific to my particular shoes). My feet were previously size 0 but now size 35. You may find that your shoes behave differently. Note that mine are prim shoes, not mesh. The Ruth2 avatar is definitely MUCH better than the system avatar. It is even worth shoe problems. However, you may well find that you can resolve these.

Lastly, the HUD only allows certain colours of nails by default. I often wear light blue, dark green or black nails. It does offer grey, which is better than nothing. I shall have to investigate if it It can be hacked in order to provide different colours than the rather staid range of default colours. The hands are otherwise great, though.

[Ed.] The HUD for the Ruth2 Business mesh avatar does allow nail colours to be altered by altering the notecard inside. Hooray! (Note: you will need to get the vectors for the colours, which can be obtained from the viewer by going to the colour picker and copying them from there. Firestorm makes this easy.)

It was surprisingly easy to use Ruth2. It’s a shame that IARs can only be imported directly into the Library on standalones rather than grids. I’d like to make Ruth2 and Roth2 available to my users. Oh yeah, I have precisely one other occasional or semi-regular user (who comes largely to humour me, being such a kind sort of chap and a really good friend.)

[Ed.] To clarify, you can pick up these avatars without using IARs but it would still be good to be able to put them into the library on a grid so that new registrants can use them.

I have no comment to make on Roth2 because I really don’t have an opinion on male bodies. They seem to be serviceable enough: and that is the extent of my personal expertise. It is, I admit, a gap in my education. Along with Hieratic, the biodiversity of yams, solar physics and crochet.

I have also made no real effort to acquire mesh clothes, with the result that my appearance, while radically improved from 2007 (when I even had a system skin and system hair!), is rather dated, maybe a decade or so out of date by OpenSim/SL standards. I really need a plain mesh skirt to replace my flexi skirt that I use as a component of nearly everything.

[Ed.] I have been given some guidance on the matter of mesh skirts and there may be a free one. Thank you to my kind advisor, who I shall not name here, but who dropped by out of the kindness of his own heart and took a LOT of trouble to help me out and inspire me to sort things out with Ruth2 ❤ What an absolutely lovely thing to do. Aren’t people nice in OpenSim grids?! Hooray! 🙂

Starflower’s original system skin and hair re-created from 2007. Old school! My current shape (shown here) evolved from the original one.

That was the first time I had been anywhere in company (more than two people) in the metaverse for years. The people all seemed polite and nice, which was refreshing after many less pleasant experiences in SL. But it did all seem rather like a blast from the past for me and very SL-like otherwise. I felt a lot less hermit-like because Apollo and Thirza were there, so at least I felt like I slightly knew somebody or had been invited, rather than just gatecrashing a random party and hiding at the back. This is my normal modus operandi at parties, as you may not be surprised to hear. Anyway, a big thank you to them for including me and being so kind.

Next time: back to more boring details about TLS implementation in OpenSim! 😀