PageRenderTime 17ms CodeModel.GetById 16ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 0ms

/AuroraDocs/AAFunctions/aaSetEnv-Simple Anti Gravity Simulation.lsl

https://bitbucket.org/VirtualReality/software-testing
Unknown | 21 lines | 21 code | 0 blank | 0 comment | 0 complexity | ecd46877a341c6ae791dd31eafaab4d2 MD5 | raw file
 1float currentGrav = -9.8;
 2default
 3{
 4    state_entry()
 5    {
 6        llSay(0, "Script running.");
 7    } 
 8    touch_start(integer number)
 9    {
10        llSetTimerEvent(0.25);
11    }
12    timer()
13    {
14        currentGrav += 1;
15        if(currentGrav == -0.8)
16            currentGrav = 0;
17        if(currentGrav >= 2)
18            llSetTimerEvent(0);
19        aaSetEnv(GRAVITY_FORCE_Z, [currentGrav]);
20    }
21}