OsClearObjectAnimations

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(Created page with "{{osslfunc |function_syntax=integer osClearObjectAnimations() |description= clears all animations on the prim, returning how many it had running")
 
(Add another exemple)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{osslfunc
 
{{osslfunc
 +
|threat_level=ignored
 +
|permissions=true
 +
|delay=0
 
|function_syntax=integer osClearObjectAnimations()
 
|function_syntax=integer osClearObjectAnimations()
|description= clears all animations on the prim, returning how many it had running
+
|description=Clears all animations on the prim, returning how many it had running.
 +
|ossl_example=<source lang="lsl">
 +
//
 +
// osClearObjectAnimations Script Exemple
 +
// Author= djphil
 +
//
 +
 
 +
default
 +
{
 +
    state_entry()
 +
    {
 +
        llSay(PUBLIC_CHANNEL, "Right click on this object (animesh) and select \"Touch\" to see osClearObjectAnimations usage.");
 +
    }
 +
 
 +
    touch_start(integer number)
 +
    {
 +
        integer total = osClearObjectAnimations();
 +
 
 +
        if (total > 0)
 +
        {
 +
            llSay(PUBLIC_CHANNEL, (string)total + " animation(s) of this object (animesh) have been cleared with success ...");
 +
        }
 +
 
 +
        else
 +
        {
 +
            llSay(PUBLIC_CHANNEL, "There is " + (string)total + " animation running in this object ...");
 +
        }
 +
    }
 +
}
 +
</source>
 +
<source lang="lsl">
 +
//
 +
// osClearObjectAnimations Script Exemple
 +
// Author= djphil
 +
//
 +
 
 +
default
 +
{
 +
    state_entry()
 +
    {
 +
        llSay(PUBLIC_CHANNEL, "Drop this script to the object's inventory (animesh) to see osClearObjectAnimations usage.");
 +
        llSay(PUBLIC_CHANNEL, "The script will then be automatically deleted from the object's inventory (animesh).");
 +
 
 +
        integer total = osClearObjectAnimations();
 +
 
 +
        if (total > 0)
 +
        {
 +
            llSay(PUBLIC_CHANNEL, (string)total + " animation(s) of this object (animesh) have been cleared with success ...");
 +
        }
 +
 
 +
        else
 +
        {
 +
            llSay(PUBLIC_CHANNEL, "There is " + (string)total + " animation running in this object ...");
 +
        }
 +
 
 +
        llRemoveInventory(llGetScriptName());
 +
    }
 +
}
 +
</source>
 +
|additional_info=Added in 0.9.2.0
 +
}}

Latest revision as of 11:00, 2 December 2020

integer osClearObjectAnimations()
Clears all animations on the prim, returning how many it had running.
Threat Level This function does not do a threat level check
Permissions Use of this function is always allowed by default
Extra Delay 0 seconds
Example(s)
//
// osClearObjectAnimations Script Exemple
// Author= djphil
//
 
default
{
    state_entry()
    {
        llSay(PUBLIC_CHANNEL, "Right click on this object (animesh) and select \"Touch\" to see osClearObjectAnimations usage.");
    }
 
    touch_start(integer number)
    {
        integer total = osClearObjectAnimations();
 
        if (total > 0)
        {
            llSay(PUBLIC_CHANNEL, (string)total + " animation(s) of this object (animesh) have been cleared with success ...");
        }
 
        else
        {
            llSay(PUBLIC_CHANNEL, "There is " + (string)total + " animation running in this object ...");
        }
    }
}
//
// osClearObjectAnimations Script Exemple
// Author= djphil
//
 
default
{
    state_entry()
    {
        llSay(PUBLIC_CHANNEL, "Drop this script to the object's inventory (animesh) to see osClearObjectAnimations usage.");
        llSay(PUBLIC_CHANNEL, "The script will then be automatically deleted from the object's inventory (animesh).");
 
        integer total = osClearObjectAnimations();
 
        if (total > 0)
        {
            llSay(PUBLIC_CHANNEL, (string)total + " animation(s) of this object (animesh) have been cleared with success ...");
        }
 
        else
        {
            llSay(PUBLIC_CHANNEL, "There is " + (string)total + " animation running in this object ...");
        }
 
        llRemoveInventory(llGetScriptName());
    }
}
Notes
Added in 0.9.2.0


Personal tools
General
About This Wiki