Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Script: Animations without pose balls?

Tifosa Twang
Registered User
Join date: 26 Mar 2006
Posts: 25
11-26-2006 14:47
I've seen furniture that have animations tied in, without the pose balls. These are embedded in the furniture itself and not click appear/disappear. Does anyone know what script this is? Or, if you are willing to sell the script, please IM me in-world.

Thanks!

Tif
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
11-26-2006 14:51
its the exact same thing as a poseball ... problem is you have to sit down and calulate (or just fight till you get it) sit position offsets and rotations

which is the reason most ppl just use a poseball .. its simpler to put a ball up with no offsets and zero rotation and move it around till it fits :)
Tifosa Twang
Registered User
Join date: 26 Mar 2006
Posts: 25
11-26-2006 15:09
so do you just drop the animation into the piece (furniture) itself? I've seen scripts included with the animation.
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
11-26-2006 15:13
From: Tifosa Twang
so do you just drop the animation into the piece (furniture) itself? I've seen scripts included with the animation.


Yes. As Osgeld said the (root prim of your) furniture becomes your pose ball.
It contains the animations, script and any configuration notecards(s).
BamBam Sachertorte
floral engineer
Join date: 12 Jul 2005
Posts: 228
11-26-2006 15:25
You need to put the animation and the script into the furniture prim. This is a script that I use. It works with multiple sit prims linked together and can override AOs. I got it from the script library.


CODE
string ani_name;
key sitter;
vector sit_offset = <-0.8,-0.15,-0.4>;
vector sit_rot = <90, -90, 0>;

default
{
state_entry()
{
llSitTarget(sit_offset, llEuler2Rot(sit_rot * DEG_TO_RAD));
ani_name = llGetInventoryName(INVENTORY_ANIMATION, 0);
sitter = NULL_KEY;
}

changed(integer thechange) {
if (thechange & CHANGED_LINK) {
key now = llAvatarOnSitTarget();
if (now == sitter) return; // some other seat
if (now != NULL_KEY) {
llRequestPermissions(now, PERMISSION_TRIGGER_ANIMATION);
} else if (sitter != NULL_KEY) {
llStopAnimation(ani_name); // Remove if this causes error in some SL vers
llSay(-8888,((string)sitter)+"booton");
}
sitter = now;
}
}

run_time_permissions(integer perms) {
if (perms & PERMISSION_TRIGGER_ANIMATION) {
llSay(-8888,((string)sitter)+"bootoff"); // Lockmeister AO disable signal
llSleep(0.3); // Wait for AO to detect state and start its animation
list n = llGetAnimationList(sitter); // Stop all animations on avatar
integer t;
for (t=0; t<llGetListLength(n); t++) llStopAnimation(llList2Key(n,t));
llStartAnimation(ani_name); // Run our own animation
}
}

}
Arielle Ceres
Registered User
Join date: 18 Nov 2006
Posts: 30
01-12-2007 12:37
I know this subject is ages old, but it's something I'm dealing with right now. One question I have is.. can more than one person sit on the same piece of furniture?
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
01-12-2007 13:29
From: Arielle Ceres
I know this subject is ages old, but it's something I'm dealing with right now. One question I have is.. can more than one person sit on the same piece of furniture?


\As long as you have set up sit targets for them.