aight this is what i've come up with. how can i make the leaf's movement smoother, but still keep the same speed?
NPC Code:
//#CLIENTSIDE
if ( playerenters || timeout ){
this.x=random(0,.5);
this.y=random(0,.5);
x += (random(.2,1));
y += (random(-.8,1));
showimg 1,leaves.png,x,y;
changeimgpart 1,16*abs(int(random(-1,1))),16*abs(int(random(-1,1))),16,16;
changeimgcolors 1,1,1,1,1;
timeout = .1;
}