Jump to content

Playing own animation fail


Ne0 Nirvana
 Share

You are about to reply to a thread that has been inactive for 3487 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

hey guys,

I'm having trouble to play my own animation.

I have uploaded the animation and I can play it via the gesture or just play inworld that animation.

The name is "swimming" and you can refer image below.

Currently, im using this code to run it if I touch one object but it seems like this code cannot find my animation.. (eventhough it is in my inventory).
Can anyone clarify this to me?

default
{
    touch_start(integer detected)
    {
        llRequestPermissions(llDetectedKey(0), PERMISSION_TRIGGER_ANIMATION);
    }
    run_time_permissions(integer perm)
    {
        if (perm & PERMISSION_TRIGGER_ANIMATION)
        {
            llStartAnimation("swimming");
            llOwnerSay("animation will end in 5 seconds");
            llSetTimerEvent(5.0);
        }
    }
    timer()
    {
        llSetTimerEvent(0.0);
        llStopAnimation("swimming");
    }
}

 Snip20141007_1.png

Link to comment
Share on other sites


Sassy Romano wrote:

• string     anim     –   
 an item in the inventory of the prim this script is in
or built-in animation

(put the animation in the object, it's no use in your avatar inventory)

Yeay! It worked. Thanx! haha, sometimes the brain did not process the fact before the hand begin to write... 

Link to comment
Share on other sites

Just for reference, it's done this way, so that you have to own the animation.  You can view the animation UUID through various methods and if it were like textures, then you'd be able to play any animation by calling it merely by UUID.  The inbuilt animations can be called by UUID only.

Having said this, texture UUID's ARE freely available but we have to pretend that they're not, just to keep people happy.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3487 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...