OsCheckODE

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(Created page with "{{osslfunc |threat_level=None |function_syntax=integer osCheckODE() |ossl_example=<source lang="lsl"> // // Example of osCheckODE() // Returns 1 if OpenDynamicsEngine is enabl...")
 
m (Added note stating which version of OpenSim introduced this function)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{osslfunc
 
{{osslfunc
|threat_level=None
+
|threat_level=ignored
 +
|permissions=true
 +
|delay=0
 
|function_syntax=integer osCheckODE()
 
|function_syntax=integer osCheckODE()
 
|ossl_example=<source lang="lsl">
 
|ossl_example=<source lang="lsl">
Line 7: Line 9:
 
// Returns 1 if OpenDynamicsEngine is enable else return 0
 
// Returns 1 if OpenDynamicsEngine is enable else return 0
 
//
 
//
 +
 
default
 
default
 
{
 
{
 
     state_entry()
 
     state_entry()
 
     {
 
     {
         llOwnerSay("osCheckODE = " + osCheckODE());
+
         if (osCheckODE())
 +
        {
 +
            llOwnerSay("This script requires Bullet or ubOde physics engine");
 +
        }
 +
 
 +
        llSleep(5.0);
 +
        llDie();
 
     }
 
     }
 
}
 
}
 
</source>
 
</source>
|description=Returns the value of OpenDynamicsEngine as a integer.
+
<source lang="lsl">
|
+
//
 +
// Example of osCheckODE()
 +
// Returns 1 if OpenDynamicsEngine is enable else return 0
 +
//
 +
 
 +
default
 +
{
 +
    state_entry()
 +
    {
 +
        if (!osCheckODE())
 +
        {
 +
            llOwnerSay("This script is not compatible with legacy ODE physics engine.");
 +
        }
 +
 
 +
        llSleep(5.0);
 +
        llDie();
 +
    }
 +
}
 +
</source>
 +
|description=That it checks if physics engine is legacy ODE and returns 1 ( TRUE ) it is, or 0 ( FALSE ) if not.
 +
|additional_info=This function was added in 0.8.2-post-fixes
 
}}
 
}}

Latest revision as of 09:24, 15 October 2018

integer osCheckODE()
That it checks if physics engine is legacy ODE and returns 1 ( TRUE ) it is, or 0 ( FALSE ) if not.
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)
//
// Example of osCheckODE()
// Returns 1 if OpenDynamicsEngine is enable else return 0
//
 
default
{
    state_entry()
    {
        if (osCheckODE())
        {
            llOwnerSay("This script requires Bullet or ubOde physics engine");
        }
 
        llSleep(5.0);
        llDie();
    }
}
//
// Example of osCheckODE()
// Returns 1 if OpenDynamicsEngine is enable else return 0
//
 
default
{
    state_entry()
    {
        if (!osCheckODE())
        {
            llOwnerSay("This script is not compatible with legacy ODE physics engine.");
        }
 
        llSleep(5.0);
        llDie();
    }
}
Notes
This function was added in 0.8.2-post-fixes


Personal tools
General
About This Wiki