Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Poseball Animation Help!

Danjin Giha
Registered User
Join date: 20 May 2007
Posts: 5
06-12-2007 03:08
Hi, i recently got my hands on a whole bunch of Animations and Poseballs,(Thanks Sitting Lightcloud - Search Hill Top Paradise for free poseballs), but I'm having trouble putting the Animations onto the Poseballs.

This is the script -

//*****************************************
//* Nyterave animation ball script! *
//* FREE TO USE V2.1 *
//* by Sitting Lightcloud *
//******************************************/

// * * * * * * * MODIFY BELOW * * * * * * *//


// position to sit on the ball e.g <0.0, 0.0, 0.43>
// sit 0.5 meter above the ball
vector POSITION=<0.0, 0.0, 0.055>;

// hovertext above ball. "" for none.
// add '\n ' at the end to move text up i.e.
// string HOVERTEXT="Sit Here\n ";
string HOVERTEXT="Sit Here";

// Pie Menu Sit Text. Will only work for the
// main prim but included it anyway. If no text
// is entered between "" it won't be used.
string SIT_TEXT="";


// hovertext color 'r,g,b' e.g. "255,255,255" (white)
string HOVER_RGB="255,255,255";

// LISTEN sets if this ball should listen for voice commands
// or not. You only need to enable this for 1 ball if you
// link several balls to an object. (to reduce lagg).
// Change to TRUE to enable FALSE to disable.
integer LISTEN=TRUE;

// What channel to listen for hide/show on. If you want to
// listen to normal conversation (hide/show), set channel
// to 0 otherwise the command will be /channel hide, show
integer CHANNEL=8;

// * * * * * * * STOP MODIFY * * * * * * * *//




set_text()
{
if (llStringLength(HOVERTEXT)>0)
{
rgb=llCSV2List(HOVER_RGB);
llSetText(HOVERTEXT,<llList2Float(rgb,0)*0.003921568627450980392156862745098,llList2Float(rgb,1)*0.003921568627450980392156862745098,llList2Float(rgb,2)*0.003921568627450980392156862745098>,1.0);

}
else
llSetText("",<0,0,0>,0.0);
}
start_listen()
{
llListenRemove(listener);
if (LISTEN==TRUE)
listener=llListen(CHANNEL,"","","";);
}
hide_me()
{
llSetAlpha(0.0, ALL_SIDES);
llSetText("",<0,0,0>,0.0);
}
show_me()
{
llSetAlpha(1.0, ALL_SIDES);
set_text();
}
list rgb;
string animation;
integer listener;
default
{
state_entry()
{
if (llStringLength(SIT_TEXT)>0)
llSetSitText(SIT_TEXT);
llSitTarget(POSITION, ZERO_ROTATION);
set_text();
start_listen();
}

on_rez(integer r)
{
start_listen();
}

listen(integer channel, string name, key id, string msg)
{
if (msg=="hide";)
{
hide_me();
llMessageLinked(LINK_SET,0,"hide", NULL_KEY);
}
else if (msg=="show";)
{
show_me();
llMessageLinked(LINK_SET,0,"show", NULL_KEY);
}
}

changed(integer change)
{
if (change & CHANGED_LINK)
{

if (llAvatarOnSitTarget() != NULL_KEY)
{
llRequestPermissions(llAvatarOnSitTarget(), PERMISSION_TRIGGER_ANIMATION);
}
else
{
integer perm=llGetPermissions();
if ((perm & PERMISSION_TRIGGER_ANIMATION) && llStringLength(animation)>0)
llStopAnimation(animation);
llSetAlpha(1.0, ALL_SIDES);
set_text();
animation="";
}
}
}
run_time_permissions(integer perm)
{
if (perm & PERMISSION_TRIGGER_ANIMATION)
{
llStopAnimation("";);
animation=llGetInventoryName(INVENTORY_ANIMATION,0);
llStartAnimation(animation);
llSetAlpha(0.0, ALL_SIDES);
llSetText("",<0,0,0>,0.0);
}
}

link_message(integer sender_num, integer num, string str, key id)
{
if (str=="hide";)
{
hide_me();
}
else if (str=="show";)
{
show_me();
}
}
}


Now my problem is, I don't know much scripting... more like nothing lol, and I'm not too sure where i insert the Animation. I think it's here... I'll use (hands on head) as a example Animation.

)>0)
llStopAnimation(animation);
llSetAlpha(1.0, ALL_SIDES);
set_text();
animation="hands on head";
}
}
}
run_time_permissions(integer perm)
{
if (perm & PERMISSION_TRIGGER_ANIMATION)
{
llStopAnimation("hands on head";);

I'm also guessing that you drag and drop the animation into the Poseball aswell. But then when i sit on it, its just a basic sit, no animation... So what am i missing?

Thanks to all who want to help me!!!
Much appreciated!
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
06-12-2007 03:45
Seems an odd poseball script, actually, cuz it's not explicitly stopping the basic "sit" animation, so unless the animations you add to the poseball have higher priority, you'll see that basic "sit" instead. Could change where it says:

llStopAnimation("";);

to

llStopAnimation("sit";);

(I've seen some that also stop some kind of female sit, but I suspect that's superstitious.)

Of course, if you're wearing an AO that overrides "sit", all bets are off anyway.

The script is strange, too, cuz the line 'animation="";' (that you were considering changing to 'animation="hands on head";') would seem unable to have any effect whatsoever, no matter how you set it.

So... wonder if this is the current version of this script... perhaps there's a different version at NyteMyst. Or, if you want to try a different script, I've been using (various hacks of) CrystalShard Foo's public domain poseball script... not sure where to pick that up now, but I think I originally got it from Paul Lobo's shop, long ago. (hope referencing these names doesn't violate the forum guidelines)
Danjin Giha
Registered User
Join date: 20 May 2007
Posts: 5
Found something that works!
06-12-2007 04:42
Just looked at /54/04/50071/1.html and that works perfectly for me. So i guess I'll go with that, but if anyone still wants to work out the script i posted, feel free to share what you find out!

Thanks, Danjin Giha.
Boss Spectre
Registered User
Join date: 5 Sep 2005
Posts: 229
06-12-2007 08:52
I agree, the line which reads:

llStopAnimation("";);

is completely useless. It should either be removed, or changed to:

llStopAnimation("sit";);

Otherwise it asks the system to stop an animation named "" which of course cannot exist as anims can only be invoked by a non-empty name string.

The script you posted chooses the first animation in the prim's inventory using this line:

animation=llGetInventoryName(INVENTORY_ANIMATION,0 );

So it will play an anim so long as there is at least one animation in the prim's inventory. The fact it does not show up is very likely due to the chosen anim having a lower priority than "sit" which is left running underneath (with priority 4).

You could add some code which checks the number of anims present in prim inventory like this:

if (perm & PERMISSION_TRIGGER_ANIMATION)
{
if (llGetInventoryNumber(INVENTORY_ANIMATION) > 0)
{
llStopAnimation("sit";);
animation=llGetInventoryName(INVENTORY_ANIMATION,0 );
llStartAnimation(animation);
}
llSetAlpha(0.0, ALL_SIDES);
llSetText("",<0,0,0>,0.0);
}

This way it will only stop the sit if there's another anim present in the prim, which it then plays instead.

BTW - animations will override others so long as the priority is *equal* or higher, not just higher, since it's started after the sit anim has started playing, and equal priority anims do override those playing before them. As the "sit" animation is priority 4, any anim wishing to override it without stopping it will need to also be priority 4, as this is the highest priority. You can test if your anim overrides the sit anim by sitting on an empty box and then playing your anim out of your inventory. If you see your anim, then it will override the default sit anim even if it's not stopped by the sit script.
Lugi Spitteler
Registered User
Join date: 5 May 2007
Posts: 53
Hey Guys...
06-12-2007 10:06
I know nothing about scripting, but had a question since you all seem to know a lot... I'm going to create an "escort" room that can be TP'd from my club and wanted to add various poseballs... The question I have is... Every animation I've seen in the adult areas are very crude... Body parts don't line up, body parts protrude the partner, etc... I was just wondering... Isn't there any way to make the "perfect" poseballs for the right price? Meaning Isn't there a way to tell where each of the partners "parts" line-up to make it more realistic?

Just curious...

Lugi
Absinthe Sautereau
Registered User
Join date: 26 Mar 2007
Posts: 86
06-12-2007 10:28
No.

However, some can be tweaked towards good averages, or between specific av's... I have worked on a few and have some good results but they are time consuming. Contact me inworld and we can discuss this..

Absinthe Sautereau
Lugi Spitteler
Registered User
Join date: 5 May 2007
Posts: 53
Thanks.
06-12-2007 10:35
I'll contact you for sure. Do you do scripting and animating? I have several projects I need help with. But we can discuss that online.

Lugi