OsClearObjectAnimations

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(Add exemple)
Line 4: Line 4:
 
|delay=0
 
|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>
 
|additional_info=Added in 0.9.2.0
 
|additional_info=Added in 0.9.2.0
 
}}
 
}}

Revision as of 11:57, 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 ...");
        }
    }
}
Notes
Added in 0.9.2.0


Personal tools
General
About This Wiki