Screvvball Posted September 25 Posted September 25 Hello! I got stuck at the moment on how to make an attached object, which floats by script to make my avatar move with that same object, making a floating effect to it as well Here is the current code, which helps me with my object float up and down, but not sure how to make my avatar to move with it as well float meters = 0.15; // 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(llGetLocalPos() + <0,0,meters/steps>); // ...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(llGetLocalPos() - <0,0,meters/steps>); // ...move it down. llSleep(delay); // Allow delay between movements. ; } upDown = "down"; // Now it's down! } } } default { state_entry() { hoverPrim(); } }
Quistess Alpha Posted September 25 Posted September 25 To make your avatar float, you'd want to play an 'animation' rather than setting the position of your avatar directly. That said, you could maybe hack something together with https://wiki.secondlife.com/wiki/LlSetHoverHeight (which does ~not change the 'hover height' slider. They're completely different mechanisms with the same name)
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now