Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Animation Question

Adriana Caligari
Registered User
Join date: 21 Apr 2005
Posts: 458
10-10-2005 13:09
Hi all

Ok maybe I have mis-read this - from the wiki entry on llStartAnimation

"Note that while the official docs claim "This function starts animation anim for the avatar that owns the object.", that is incorrect. As long as permissions have been granted, any avatar can be animated using llStartAnimation."

This would sort of imply that you can start animations for other people ( I have seen dance balls do it I think - you touch them get asked for permission - you dance )

So how do you start an animation for someone else - the startanimation command only has 1 argument - which animation to start.
Not which avatar to start it for......

I wanted to do something along the lines of a dance machine without the touch - using sensors to find people and ask permission then make them dance but gave up on the idea after seeing that you cannot direct a startanimation at a specific avatar.

Any suggestions ? Or am I missing something dead obvious ?
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
10-10-2005 13:53
Use llRequestPermissions to ask a specific avatar for permission to animate them. Once you've received the permissions, I believe llStartAnimation will animate whoever has currently granted you permissions. I don't fully understand how this stuff works, so I'm not sure how one script would animate multiple avatars. Maybe you ask them all, and keep the av keys in a list so you can turn the animations off. That's a guess. People might be unhappy if they couldn't turn off the dance :)
Fenrir Reitveld
Crazy? Don't mind if I do
Join date: 20 Apr 2005
Posts: 459
10-10-2005 14:03
Ziggy is correct. It goes by scripts -- so, when a single script requests permission to animate, it can then use ll[Start|Stop]Animation on the avatar that it requested permission from.

Do a search for "Solop Dance". You'll find a free dance script that works by having multiple scripts handle the dancers. When you touch the prim, the main script farms out the request to sub-scripts -- one for each each potential dancer. These slave scripts request permission to animate and then play the dance.
Adriana Caligari
Registered User
Join date: 21 Apr 2005
Posts: 458
10-11-2005 21:41
Thanks - will give it a try