Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Learjeff's Easy Sit Target Positioner (FREE)

Learjeff Innis
musician & coder
Join date: 27 Nov 2006
Posts: 817
08-06-2007 10:52
I've posted my version of Lex Neva's sit target positioner on SLX, for free:



This includes a sit-target helper object in a form I find convenient (flat sit target cirle, with vertical pole attached to make it easy to find and click on).

Please help me by beta testing, reviewing the scripts, and offering suggestions.

Find the scripts and README at .

The README file says not to IM for help, but beta testers please ignore this and feel free to IM me. (Please don't IM Lex Neva about it.)

Here's the synopsis:

This system helps you easily set a sit target for any prim, without editing any scripts.

Leave the target-setter script in the furniture along with any animations, to allow the sitter to choose animations using shift-arrow (left or right).

Here's how it works. You drop the "Sit Target Setter" script into your furniture (into the cushion prim). Rez and sit on the "Sit Target Helper". Move the helper until you look properly seated on your furniture. Click your furniture. Delete the helper and you're done!

As a convenience, it comes with the complete set of freebie Poser sit amims.

Additional features:
- Supports one seat per prim, for example, one per prim-cushion in a sofa.
- Supports any number of anims; sitter uses shift-arrow to change.
- Supports "rotating stool" mode, arrow key to rotate. Enabled by "rotat" anywhere in object's description.
- You can adjust the sit position at any time, using the same method. (Long-click your furniture to put it back in "setting" mode).
- Two helpers provided, black one loaded with Male sit poses, pink one with Female sits. Unfortunately, these are not compatible -- you can't use the same sit target for the freebie male and female sit anims. Blame Poser.

Note: Do NOT shift-drag to duplicate your furniture -- the copy will lose the sit target. Workaround below, but it requires script editing.

Written by Lex Neva and enhanced by Learjeff Innis. Please distribute willy-nilly. Feel free to bundle this in a furniture product, allowing owners to adjust their furniture.
Meade Paravane
Hedgehog
Join date: 21 Nov 2006
Posts: 4,845
08-06-2007 11:06
Sweet!
_____________________
Tired of shouting clubs and lucky chairs? Vote for llParcelSay!!!
- Go here: http://jira.secondlife.com/browse/SVC-1224
- If you see "if you were logged in.." on the left, click it and log in
- Click the "Vote for it" link on the left
Nina Stepford
was lied to by LL
Join date: 26 Mar 2007
Posts: 3,373
08-06-2007 12:24
i am working on a sofa, was thinking i needed something like this, and find it on page one of ra.
how cool is that?
Sue Saintlouis
Registered User
Join date: 8 Dec 2006
Posts: 420
08-06-2007 12:31
Oh this is going to be great! Thank you, Learjeff!
Alyx Sands
Mental Mentor Linguist
Join date: 17 Feb 2007
Posts: 2,432
08-06-2007 13:34
Yay, I have been fiddling with a sculptie sofa I made for a few days, and this is JUST what I need now! Thank you!!
Destiny Niles
Registered User
Join date: 23 Aug 2006
Posts: 949
08-06-2007 21:58
Nice job. One small changed that I made is in regards to the rotation.

I've added 4 lines so that the chair returns back to the original rotation after someone stop sitting.

in the global variables section added:

rotation defaultrotation; //defaultpostion of seat to return to for rotation function *********

in the entry get the starting rotation:

defaultrotation = llGetRot(); //******* original seat position

In the changed events (once for each state) added the llSetRot

if (llAvatarOnSitTarget() == NULL_KEY) {
LastAv = NULL_KEY; // nobody's sitting now
llSetRot(defaultrotation); //return to first rotation *********************
Learjeff Innis
musician & coder
Join date: 27 Nov 2006
Posts: 817
08-07-2007 06:14
Excellent, Destiny! I'll add that when I get the time. I've only used that feature on radially symmetrical stools and never noticed that aspect.

I think the best place to set the default rotation is when the person sits. That way, if you edit-turn your chair and then someone sits, it will return to where you set it last.

Also, rotation is only supported in furniture mode, so these changes are required only for that state.

Thanks! :)
Learjeff Innis
musician & coder
Join date: 27 Nov 2006
Posts: 817
08-07-2007 06:33
Folks, if you want to label the cushions "M" or "F" using floating text, you can use something like this script, which does the work and then deletes itself. Just put it in the cushion prim.

CODE

string LABEL = "M";
vector COLOR = <1.0,1.0,1.0>;
float ALPHA = 1.0;

default
{
state_entry() {
llSetText(LABEL, COLOR, ALPHA);
llRemoveInventory(llGetScriptName());
}
}


Of course, "show/hide" capability would be nice and isn't supported by this. If I can think of a good way to incorporate that into the set-target script without complicating it, I will. I don't want to add the states required to read a notecard.

It could use the cushion prim's name, if the name begins with an asterisk or something like that. Sound like a good idea?

Thanks,
Jeff
Lex Neva
wears dorky glasses
Join date: 27 Nov 2004
Posts: 1,361
08-07-2007 09:10
Ooh, way to go, LearJeff. I'm glad someone spent the time to make my system easier to use. I never really got around to improving it.
Max Pitre
Registered User
Join date: 19 Jul 2006
Posts: 370
08-07-2007 09:33
If anyone adds show/hide, please use a channel other than 0...;)
Would be nice if everyone used the same channel, 7 or 9 or whatever as long as it was standardized somehow...just a thought.
I use 7 on all mine.
Learjeff Innis
musician & coder
Join date: 27 Nov 2006
Posts: 817
08-07-2007 11:56
/1show seems to be pretty common, and that's what I'd use.

I'm still wondering whether folks would want the labels, though -- is it worth the bother?
Learjeff Innis
musician & coder
Join date: 27 Nov 2006
Posts: 817
08-07-2007 11:57
YW, Lex -- but I'd never have gotten to the easy & fun stuff if you hadn't worked out the tricky part! Big thanks to you.
Stephanie Misfit
Registered User
Join date: 25 May 2006
Posts: 155
08-07-2007 16:14
This is a great idea! The system that gets delivered from SL Exchange though is no mod, no copy so you can't add animations to the positioner.
Alyx Sands
Mental Mentor Linguist
Join date: 17 Feb 2007
Posts: 2,432
08-07-2007 17:31
I just built my first proper multi anim comfy chair, and did it in less than ten minutes-YOU ROCK, LearJeff!
Learjeff Innis
musician & coder
Join date: 27 Nov 2006
Posts: 817
08-08-2007 07:01
Darn -- I know I made those all-perms, but SOMETIMES, when taking an object containing no-mod contents into inventory, the perms get changed. (Really, this happened to me when testing just now, and then moments later the same operation worked correctly. Sheesh.)

I have reboxed, and including an empty helper which should be sure to retain the correct permissions regardless. Find it at the SLX link given above.

Also, you should be able to pull the script out of the helper and make your own helper. The helper doesn't need to be any particular shape or number of prims, but the pole helps me keep from losing it in the floor.

Thanks for promptly reporting this problem!
Dmitriy Gausman
Registered User
Join date: 16 May 2007
Posts: 132
08-10-2007 14:30
First thanks, to Learjeff and also to Lex.Yesterday I was able to set some positions even without the ability to copy them to the helper, so it was a HUGE help. I just got the one that has the permissions and I I have been trying to use some of the sit on ground positions. When I play the animations outside of the helper, they appear fine. When I place them in my prim and the helper, it doesn't display the animation properly. It seems all the sit on ground ones, even those not included with this, all look the same.

Any ideas? I re-logged and cleared my cache, deleted both the prim side and helper side, and can't seem to get those sit on ground ones to work.

Dmitriy
Learjeff Innis
musician & coder
Join date: 27 Nov 2006
Posts: 817
08-11-2007 05:26
Are they the freebie ground sits included (the poser default sits)? If so I'll try it myself to see if I have the same issues.

I assume you're not using an AO, but other than that, I can't figure out what might cause this. If I can recreate the problem, I'll ask the question in a new thread, in the Animations section.
Dmitriy Gausman
Registered User
Join date: 16 May 2007
Posts: 132
08-11-2007 06:13
Yes, I was using the sits that are in the kit, but also ones outside it. I think the couch positions looked fine. Of course, there is that tyical SL thing where what I see is not necessarily what others see. I made sure I had no AO attached. I'm going to have someone come and sit on the helper for me and see it maybe I see it different. I'll report back a bit later.
Dmitriy Gausman
Registered User
Join date: 16 May 2007
Posts: 132
08-11-2007 06:36
Ok, I just did a few things and this is what is happening. It seems that all of the positions, and for now, I only used the ones from the Easy Sit Target Positioner, loook okay from the waist up. All the arm movements seem fine, but the legs always stay in the knee to knee position. When I play these animations alone in world, the legs change positions - some spread out, others are crossed.

But whatever the leg position is on the the helper, that is the position that gets saved in the furniture (I am using pillows on the floor). So what happens is, the legs always go through the floor as they don't cross or spread out.

I had a friend sit on the helper and scroll through the positions. He too had no leg animation.

The other night I was able to set positions with crossed or spread out legs. However, I was using the helper that did not allow poses to be copied, so I did it blind with the legs. But they still animated properly.

It seems that since yesterday, I have not had any success, and I have used the new helper. I have even tried it without poses in either the helper or the furniture, just to see what would happen visually.

Hope some of that helps.

Dmitriy
Learjeff Innis
musician & coder
Join date: 27 Nov 2006
Posts: 817
08-11-2007 07:45
Found the prob, bug in the script. Fix to be posted soon!
Learjeff Innis
musician & coder
Join date: 27 Nov 2006
Posts: 817
08-11-2007 13:30
OK, fix posted to SLX.
Dmitriy Gausman
Registered User
Join date: 16 May 2007
Posts: 132
08-11-2007 13:48
Thank you LearJeff - will get it now. Really appreciate your time doing this!!!
Absinthe Primrose
Registered User
Join date: 17 Nov 2006
Posts: 6
Cushions on Couch Keep "flipping"/"rotating" when avatar stands up
09-10-2007 19:18
First off: Thanks soooo much Learjeff for an awesome product ... I've been using it in my single sit chairs and sun loungers without any problems.

Recently, though, I have created a couch and I understand that you can add one sit per prim ... and I'm very careful which prim I select for the animation, careful which animation and Sit Sitter Script I'm adding to that prim (and making sure I use the same animation in the Sit Target Helper) and I'm careful to make sure which prim I "Touch" to complete the Sit Target Positioner process.

The problem I run into: when an avatar stands after sitting on the couch, that prim will flip/rotate into another position ... I own the animations, they are copiable and transferable (although I do make sure to make the animations and the furniture piece copy/no transfer.

Now the only time the prims "behaves themselves" is if that prim is not linked to the rest of the couch. I'v tried running the Sit Target procedure when the items are linked and unlinked (hoping that I could figure out what I'm doing wrong), I've even recreated the couch from scratch ... no luck.

I'm sure it's some simple thing I'm overlooking and/or doing wrong, but after several hours of trying to figure it out, I'm stumped and I am now asking the experts here in SLForums for your help ;P

Thanks in advance to all of you for any help you can give me!

Best regards,
Absinthe Primrose
Lear Cale
wordy bugger
Join date: 22 Aug 2007
Posts: 3,569
09-11-2007 05:01
Ah, I think I might have made a mistake to an addition based on a suggestion above. I'll get back to you when I can.

Meanwhile, make sure the text "rotat" (upper or lower) is NOT in the description for the couch or the seat that's rotating. Rotation only works for one seat.
Learjeff Innis
musician & coder
Join date: 27 Nov 2006
Posts: 817
09-13-2007 08:27
From: Absinthe Primrose
Recently, though, I have created a couch and I understand that you can add one sit per prim ... and I'm very careful which prim I select for the animation, careful which animation and Sit Sitter Script I'm adding to that prim (and making sure I use the same animation in the Sit Target Helper) and I'm careful to make sure which prim I "Touch" to complete the Sit Target Positioner process.

The problem I run into: when an avatar stands after sitting on the couch, that prim will flip/rotate into another position ... I own the animations, they are copiable and transferable (although I do make sure to make the animations and the furniture piece copy/no transfer.


THANKS for reporting the bug. It's fixed; please pick up a new copy on SLX.

The problem was saving llGetRot() on sit and passing the saved value to llSetRot() in all cases, not just for rotating seats.

Evidently, in a prim that is not the root prim in an object, llSetRot(llGetRot()) causes the prim to turn on the Z axis. Not sure whether this is an LSL bug or a feature, but in any case, the script now leaves the object rotation alone if it's not a rotating seat (i.e., "rotat" somewhere in the object description).

I suspect this problem would happen in any case when the cushion prim is not the root prim.

Thanks again for the bug report!
1 2