Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Scripted Furniture

Halbert Bienenstich
Registered User
Join date: 18 Dec 2005
Posts: 36
02-16-2006 11:24
Are there any example scripts around that you drop into furniture and it controls the animation and position of any avatar sitting on it? I've seen a few furniture pieces that animate single or couple avatars and even give a menu that allows switching the animations on the fly without the use of pose balls. I'd be interested in seeing an example of such scripts and work on writing some scripts of my own.
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
02-16-2006 11:33
You will find a number of such scripts in the Script Library forum, just a search away
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Halbert Bienenstich
Registered User
Join date: 18 Dec 2005
Posts: 36
02-16-2006 11:37
Already tried it. A search on topics in the Script Library for "scripted furniture" returns no matches.
Patch Lamington
Blumfield SLuburban
Join date: 2 Nov 2005
Posts: 188
02-16-2006 12:08
Try looking for 'pose ball' or 'animation override'
_____________________
Blumfield - a regular everyday kind of 'burb in an irregular world.
This notice brought to you by the Blumfield Visitors and Residents Bureau.
Halbert Bienenstich
Registered User
Join date: 18 Dec 2005
Posts: 36
02-16-2006 12:31
Oh there's lots of matches on Pose Ball Animation and Animation Overrides. That's not what I'm looking for. What I'm looking for is examples of scripts (and animations they play) that go into the prims of the furniture itself and animates avatars without linking any pose balls to the furniture, hence the reference to "scripted furniture". The animations are started by avatar(s) sitting on prims of the furniture itself. And the current animation the avatar is running can be switched by clicking on the furniture again while the avatar(s) is already sitting. I assume it would also involve the use of multiple sit targets on the numbered prims of the furniture. In the case of couples animations, it would be useful to be able to determine the gender of the avatar and automatically pick the correct animation in the couples animation for that avatar. Failing that, probably have to pop up a dialog and ask the agent the avatar's gender. I personally find that pose balls ruins the look of some really nice furniture pieces and am looking for a means to get the job done without them.
Ceera Murakami
Texture Artist / Builder
Join date: 9 Sep 2005
Posts: 7,750
02-16-2006 12:48
Hi again, Halbert!

You can modify a pose ball script and put it directly into a prim that is the seat of a piece of furniture. I do this for kneeling cushions that I sell. IM me in world, and I can show you how I did that for my cushions. This is limited to one pose per prim, however, and not using a pose ball makes it difficult to adapt to a wide range of avatar sizes.

Just thinking that over, and recalling the nice furnishings in your home, you could probably use that simple method to script both arms of a chair, so touching one arm lets you do the male seated pose, adjusted for you, and touching the other lets your Lady do the female seated pose, adjusted for her. In both cases, the seated position could be in the appropriate place on the seat of the chair, though the scripts are in the arm prims.

Doing a multi-animation script that has a menu is much more complex, I think. Haven't tried that yet, myself. You should check the LSL scripting WIKKI for stuff on dialogs, animations and other user feedback scripts, so a touch event on a chair can ask permission to animate the character with a dialog-driven selection of poses.

I'm fairly certain that a script can detect the gender of the person who did a touch event. Look up 'sensors' in the WIKI.
Riann Maltese
!@%$#
Join date: 20 Jul 2005
Posts: 35
02-16-2006 12:54
Personally I find the advantages of a poseball much more appealing than the disadvantages. After all who wants to mess with the sittarget of a prim to make adjustments to fit when you can just move the ball around.

However if you are hellbent on doing this the scripts for animating are the same you just put it into the furniture instead of a poseball. One sit target script per prim per person sitting. One thing to note though changing sit targets does NOT change the position of a currently sitting sitter. Thus you will probably need to make your own animations where you can control where the avatar is animated compared to the reference frame. (Believe me, this is more difficult than it sounds...Every AV is differently shaped.) You could also unsit the person each time you wish to change the animation.
Halbert Bienenstich
Registered User
Join date: 18 Dec 2005
Posts: 36
02-16-2006 12:59
Thanks Ceera! I'll give ya a yell and try starting with something basic like what you suggested then see if I can work up to the more complex stuff. Probably take me awhile but will be an interesting project. I don't guess most people mind pose balls, but more than two or 3 on one furniture piece and its start looking like a McDonald's Moonwalk playground piece.
Ceera Murakami
Texture Artist / Builder
Join date: 9 Sep 2005
Posts: 7,750
02-16-2006 13:03
I agree, Halbert. That's why I eliminated them from my cushions.

Here's another idea. Go ahead and use the pose balls, but add a touch-sensitive script to show the pose balls only for a brief period after the chair is touched, and then hide them if nothing happens after 5 second or so.

I should be in-world in a few hours, if you want to talk about this.

I think the llLinkMessages command is what you would want to use for that, to eliminate chat spamming and open listens.
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
02-16-2006 21:13
From: Ceera Murakami
I'm fairly certain that a script can detect the gender of the person who did a touch event. Look up 'sensors' in the WIKI.


You cannot detect the gender of an av. As there have been debates on this topic before, i'll skip to the conclusion. If you want to know the gender of the av, ask. Restricting your product to exclusively male-female relationships will reduce your chances of a larger market share.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey