Simple Anti Gravity Simulation

De DigiWiki.

(Différences entre les versions)
(Page blanchie)
 
Ligne 1 : Ligne 1 :
-
 
+
<lsl>
 +
float currentGrav = -9.8;
 +
default
 +
{
 +
    state_entry()
 +
    {
 +
        llSay(0, "Script running.");
 +
    }
 +
    touch_start(integer number)
 +
    {
 +
        llSetTimerEvent(0.25);
 +
    }
 +
    timer()
 +
    {
 +
        currentGrav += 1;
 +
        if(currentGrav == -0.8)
 +
            currentGrav = 0;
 +
        if(currentGrav >= 2)
 +
            llSetTimerEvent(0);
 +
        aaSetEnv (GRAVITY_FORCE_Z, [currentGrav]);
 +
    }
 +
}
 +
</lsl>

Version actuelle en date du 13 octobre 2012 à 22:04

float currentGrav = -9.8;
default
{
    state_entry()
    {
        llSay(0, "Script running.");
    } 
    touch_start(integer number)
    {
        llSetTimerEvent(0.25);
    }
    timer()
    {
        currentGrav += 1;
        if(currentGrav == -0.8)
            currentGrav = 0;
        if(currentGrav >= 2)
            llSetTimerEvent(0);
        aaSetEnv (GRAVITY_FORCE_Z, [currentGrav]);
    }
}
Outils personnels
  • Cette page a été consultée 890 fois.
donate
Google Ads