Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Freezing at the end of anim; emotes

Ricky Shaftoe
Owner, "Rickymations"
Join date: 27 May 2005
Posts: 366
01-27-2006 23:18
Hi folks,

I have two scripting questions. First, how would I go about scripting a "slide animation" that starts at X and stops at point Y? As is, if I upload, I either must loop the anim or upload it non-looped, in which case the avi bounces back from Y to X at the end of the one loop. Would I play a second anim at the end of the first? Will doing that keep me from porting back? Or do I have to add a teleport function to the second anim?

Second, how can I add facial emotes to animations? Again, is it a matter of playing a second animation, this time in tandem with the first? With a timer? And how does one animate the mouth, anyway? Choosing "big smile" seems to have no effect when I upload, for example.

Thanks!
Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
01-28-2006 10:04
You'd better think that the animation is essentially avatar's body parts morph. If you tweak its hip, it looks like moving but the original avatar's position doesn't vary at all. So the end of the animation, it would bounce back to the original position.

One suggestion for sliding animation. Make a pose ball and it is also made as a vhecle. It moves like sliding and play pose by animation which was set on the default position.

Speaking of the facial morph, are you talking about scripting?

llStartAnimation("your anim";);
llStartAnimation("express_laugh_emote";);

These two functions would play two animations alomost at the same time.
If you wanted to add facial animation after playing your animation, you could place llSleep between them.

llStartAnimation("your anim";);
llSleep(your anim's time length);
llStartAnimation("express_laugh_emote";);

And it is here that the scripting animation's list. The strings which start in "express" are facial animations.
_____________________
:) Seagel Neville :)
Ricky Shaftoe
Owner, "Rickymations"
Join date: 27 May 2005
Posts: 366
02-05-2006 22:27
Seagel, thanks for that very helpful reply! I learn something every day here. Thanks again!
Ricky Shaftoe
Owner, "Rickymations"
Join date: 27 May 2005
Posts: 366
02-14-2006 18:59
A follow-up question. How does one get a facial emote to play over and over (i.e., continuously, as if looped) while my animation is running? E.g., suppose I want to smile for 15 seconds continuously?
Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
02-14-2006 19:39
To play facial animation over and over, you can use Gattz's script in this thread. And you might be able to customize it and put llSetTimerEvent(0) after your animation stopping.
_____________________
:) Seagel Neville :)
Ricky Shaftoe
Owner, "Rickymations"
Join date: 27 May 2005
Posts: 366
02-15-2006 07:33
Thanks again! I don't think I'll need the attach() code since I just plan to play these while the avi sits on a poseball. Since I'm already checking permissions, I can add llSetTimerEvent(0.5) to run_time_permissions() and add a timer() with the facial expression. I think.

Also, if all I want is for the expression to play continuously with the animation, I'm not sure whether I need to use llSetTimerEvent(0) when someone hops off the poseball, do I? Maybe it's better scripting practice to do so?
Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
02-15-2006 08:31
I'm afraid you can't put two timer events in one script. You may have to have two scripts. One is the script for your animation, and another is the script for the face animation. And let them communicate each other. Your animation takes 15 sec to play by timer event and it send message to stop the face animation when it finishes. When the face animation receives the message, it executes llSetTimerEvent(0) like that.
_____________________
:) Seagel Neville :)
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
02-15-2006 10:38
Actually you don't need separate scripts if you have a counter or similar for your timer event. If one thing last 0.5s and the other lasts 15s you have a timer set for 0.5s. It triggers a counter, and when that counter reaches 30 (or 29 since you probably start from 0), you've run for 15s.

For count<29 you restart the smile emote.

Then at count == 29you can stop your various anims. It's not always so easy to sort out, but you can usually find a way for two timers like that.
Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
02-15-2006 14:22
Eloise, thank you very much. I've just learned that. :)
_____________________
:) Seagel Neville :)
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
02-15-2006 14:28
You can also use LibraryTimerEnhancer to mimic multiple timers :cool:
==Chris
_____________________
October 3rd is the Day Against DRM (Digital Restrictions Management), learn more at http://www.defectivebydesign.org/what_is_drm
Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
02-15-2006 14:37
Thank you, Chris. That's awesome. :)
_____________________
:) Seagel Neville :)