Two more things actually. As I was wrapping up 0.99g coding, I added two more commands: the spiralalpha and setgroup commands. They will be in this update, as well as all the things mentioned in the last couple of posts.
spiralalpha was a user request, and does pretty much what you'd expect. It takes a single parameter which is a floating point number between 0.0 and 1.0, and sets it as the alpha (or opacity) of the spiral. An alpha of 1.0 means the spiral will be completely opaque, and non-zero values below 0.1 will be almost completely transparent. Attempting to set it to 0 will reset it to its default value, which is 0.58.
setgroup takes a single string parameter which can be either the name or the key of a group that the subject belongs to, and it will set that as their active group. I was prompted to add this feature as a result of frequenting a sim with rather aggressive group-based security: if you enter the sim and you're not wearing the authorized group, then you'll be ejected in 30 seconds. I got fed up with scrambling for my groups once the first warning arrived, so I added the ability to change groups to the Mesmerizer. When used in conjunction with a couple of trigger rules, the group activation can be made automatic.
Assume that the sim in question is named "Ejection City", and the group that has to be active to be allowed to remain is called "City Dweller". First, create an internal trigger to switch to that group:
/99 dwell = internal setgroup "City Dweller"
Then create a second trigger that will fire when you change regions, and which will invoke the first trigger if you're in "Ejection City":
/99 on-region = internal executeif "'$sim' 'Ejection City' streq" dwell
Note the use of double-quotes around the expression parameter to executeif, to group '$sim' 'Ejection City' streq into a single parameter, and also the use of single quotes within that expression around $sim and Ejection City to similarly ensure that each of those is treated as a single argument to streq.
Now, whenever you enter a new region, the second rule will fire. That rule compares the current sim-name with "Ejection City", and if it matches, it invokes the first trigger, which will set the active group to "City Dweller". So now I no longer have to worry about being too slow in changing groups and getting accidentally ejected.
Of course, you'll have to wait for 0,99g to be released before you can do this yourself. I did send out the note to purchasers concerning the permission changes that I mentioned in the previous post, as well as sending it as a group notice to my support group, and I've pretty much decided that 0.99g will be when I make that change. So if you bought a Mesmerizer and have given it to someone else, please send me a notecard with your name and the name of the person you've given it to, so that they will get future updates, rather than you.
Edit, 12/11/2017:
I gave a couple of triggers above that allow you to have the Mesmerizer
automatically set your default group on entering a sim. It turns out
that doing this can run into an extremely annoying SL bug. Apparently,
changing the default group stops the rezzing process, so if you change
your group very soon after entering a sim, you may find that various
objects don't rez at all, and stay invisible. They're still there, in that you
can't walk through them, but you won't see them, and you can't click on
them. The only way to bring them back is to TP out of the sim and then come back again.
The solution is relatively simple. I gave the following as the trigger above to change the group:
/99 dwell = internal setgroup "City Dweller"
To avoid this SL bug, you just need to delay the group change for long enough that the scene will be rezzed, for example:
/99 dwell = internal wait "10.0" setgroup "City Dweller"
No comments:
Post a Comment