Difference between revisions of "LlStopObjectAnimation"

From Second Life Wiki
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 6: Line 6:
|return_text
|return_text
|spec
|spec
|caveats=
|examples=<source lang="lsl2">
<b>This function will be supported in the upcoming Animated Objects ("Animesh") project.</b><br/>Currently it will only work in supported testing areas with a supported test viewer.
default
{
    state_entry()
    {
    }
 
    // This assumes that an animation called "MyFancyWalk" is present in the inventory of the current object.
    touch_start(integer total_number)
    {
        llSay(0, "Starting animation");
        llStartObjectAnimation("MyFancyWalk");
    }
   
    touch_end(integer total_number)
    {
        llSay(0, "Stopping animation");
        llStopObjectAnimation("MyFancyWalk");
    }
}
</source>
|notes=
|notes=
Animated objects work by associating a skeleton with a linkset containing one or more rigged mesh primitives. When animations are played by a script in any of the prims in the linkset, the skeleton will animate and any rigged meshes in the linkset will move accordingly. A script running in any prim of the linkset can start, stop or query animations using the new commands. The typical usage of these functions is to do all object animation scripting in the root prim of the linkset; in this scenario, the animations and scripts would all be part of the inventory of this prim, and so of the object as a whole. However, if scripts and animations are present in multiple prims of a linkset, it is important to understand that animations are started, stopped and tracked independently in each prim.
Animated objects work by associating a skeleton with a linkset containing one or more rigged mesh primitives. When animations are played by a script in any of the prims in the linkset, the skeleton will animate and any rigged meshes in the linkset will move accordingly. A script running in any prim of the linkset can start, stop or query animations using the new commands. The typical usage of these functions is to do all object animation scripting in the root prim of the linkset; in this scenario, the animations and scripts would all be part of the inventory of this prim, and so of the object as a whole. However, if scripts and animations are present in multiple prims of a linkset, it is important to understand that animations are started, stopped and tracked independently in each prim.
Line 16: Line 35:
|cat3
|cat3
|cat4
|cat4
|mode=request
}}
}}

Latest revision as of 11:35, 5 December 2018

Summary

Function: llStopObjectAnimation( string anim );

Stop an animation for the current object.

• string anim name of an animation in the inventory of the current object, or an animation uuid

Examples

default
{
    state_entry()
    {
    }

    // This assumes that an animation called "MyFancyWalk" is present in the inventory of the current object.
    touch_start(integer total_number)
    {
        llSay(0, "Starting animation");
        llStartObjectAnimation("MyFancyWalk");
    }
    
    touch_end(integer total_number)
    {
        llSay(0, "Stopping animation");
        llStopObjectAnimation("MyFancyWalk");
    }
}

Notes

Animated objects work by associating a skeleton with a linkset containing one or more rigged mesh primitives. When animations are played by a script in any of the prims in the linkset, the skeleton will animate and any rigged meshes in the linkset will move accordingly. A script running in any prim of the linkset can start, stop or query animations using the new commands. The typical usage of these functions is to do all object animation scripting in the root prim of the linkset; in this scenario, the animations and scripts would all be part of the inventory of this prim, and so of the object as a whole. However, if scripts and animations are present in multiple prims of a linkset, it is important to understand that animations are started, stopped and tracked independently in each prim.

See Also

Functions

•  llStartObjectAnimation Start playing an animation in the current object
•  llGetObjectAnimationNames List currently playing animations in the current object

Deep Notes

Search JIRA for related Issues

Signature

function void llStopObjectAnimation( string anim );