OsCheckODE

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
Line 7: Line 7:
 
// Returns 1 if OpenDynamicsEngine is enable else return 0
 
// Returns 1 if OpenDynamicsEngine is enable else return 0
 
//
 
//
 +
 
default
 
default
 
{
 
{
Line 26: Line 27:
 
// Returns 1 if OpenDynamicsEngine is enable else return 0
 
// Returns 1 if OpenDynamicsEngine is enable else return 0
 
//
 
//
 +
 
default
 
default
 
{
 
{

Revision as of 04:44, 15 April 2017

integer osCheckODE()
That it checks if physics engine is legacy ODE and returns 1 ( TRUE ) it is, or 0 ( FALSE ) if not.
Threat Level None
Permissions No permissions specified
Extra Delay No function delay specified
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();
    }
}
Personal tools
General
About This Wiki