Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Is llStopAnimation broken or am I doing this wrong?

Seven Shikami
Registered User
Join date: 22 Sep 2006
Posts: 82
02-11-2008 19:35
Here we have a VERY basic poseball. It plays a looping animation. Works great. But I want to be able to STOP the animation ten seconds later. And it's not in fact stopping.

This is all working my way up to a syncing poseball system, and I found for some reason, I can't stop and restart an animation. I can't even just STOP it. When I try, it keeps merrily playing... until I try to type, then it does "hands typing" animation, then gets stuck in a "hands hovering" static pose.

What am I doing wrong? This seems so straightforward...

Swap in the animation name for any animation of your choice, I've tried it with bunches...

CODE
default 
{
state_entry() { llSitTarget(<0.0, 0.0, 0.20>, ZERO_ROTATION); }

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)
llStopAnimation("Haruhi Dance");
}
}
}
run_time_permissions(integer perm)
{
if (perm & PERMISSION_TRIGGER_ANIMATION)
{
llStopAnimation("sit");
llStartAnimation("Haruhi Dance");
llSetTimerEvent(10.0);
}
}

timer()
{ llWhisper(0,"Stopping animation.");
llStopAnimation("Haruhi Dance");
llSetTimerEvent(0.0); }
}
Seven Shikami
Registered User
Join date: 22 Sep 2006
Posts: 82
02-11-2008 19:55
Blargh, this is the upteenth time I figured it out a few minutes after posting...

If you don't start a new animation after stopping the old one, even if it's just "stand" or "sit" then it glitches out. By doing:

stop haruhi
start stand
(wait a split second)
stop stand
start haruhi

It nicely restarts the animation. Bleh. This kinda thing needs to be in the wiki!
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
02-12-2008 05:39
From: Seven Shikami
Bleh. This kinda thing needs to be in the wiki!

so you added it yes? =)
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -