Menu

Floats Object



Script that floats objects

float meters = .03;  // Range of hover movement in meters.
float delay = 0;  //  Delay in seconds between movements.
integer steps = 5;  //  Higher steps mean smoother and slower movement but more server load.
integer i;  // Used to increment our steps.
string upDown = “down”;  // Keeps track of up and down state

hoverPrim()

    while(0 == 0)
   
        if(upDown = “down”)  //  If object is down…
       
            while(i++ < steps + 1)
           
                llSetPos(llGetPos() + );  // …move it up.
                llSleep(delay);  // Allow delay between movements.
           
            upDown = “up”;  // Now it’s up!
       
        if(upDown = “up”)  // If object is up…
       
            while(i– >= 0) 
           
                llSetPos(llGetPos() – );  // …move it down.
                llSleep(delay);  // Allow delay between movements.
           
            upDown = “down”;  // Now it’s down!
       
   

default

    state_entry()
   
        hoverPrim();
   



Download from Source link