Jack Pot
Jack Pot

Reputation: 21

How to animate other avatar in Linden Scripting Language?

I want to -ask for permissions and- animate another avatar with an object I'm wearing. Is this possible? I think the vampire script does that (it asks for my permission to animate my avatar).

I can animate myself with such a script:

default 
{
    state_entry() 
    {
        llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION);
    }
    touch_end(integer n)
    {
        llStartAnimation("animName");
        llSleep(1.9);
        llStopAnimation("animName");
    }
}

But how can I animate other avatars?

**Edit: ** I can make other avatars animate after llRequestPermissions(avatarKey, P), but this time I cannot animate myself. Every time a single avatar is playing the animation. Is there a way I can make multiple avatars animate simultaneously, or in turns?

Thanks,

Upvotes: 0

Views: 854

Answers (1)

Jeanne Pindar
Jeanne Pindar

Reputation: 627

llStartAnimation and llStopAnimation act on the avatar who received that script's most recent permissions request. So in addition to the script that animates yourself, you need a second script, which listens to link messages you send from the first script. The link messages tell the second script who to ask permission from and when to start and stop the animation.

Upvotes: 0

Related Questions