NPC Code:
if (created) {
this.shadeoff={-.25,1.25};
this.off={.5,1};
}
if (playertouchsme && this.jumping==0) {
dir=playerdir;
jump();
while (onwall(x+this.off[0],y+this.off[1])) {
if (this.jumping=0) jump();
sleep .05;
}
}
function jump() {
this.jumping=1;
this.shadex=x;
this.shadey=y;
for (this.i=2; this.i>=-2; this.i-=.5) {
y-=this.i;
x+=vecx(dir);
y+=vecy(dir);
this.shadex+=vecx(dir);
this.shadey+=vecy(dir);
//showimg 0,shadow.gif,this.shadex+this.shadeoff[0],this.shadey+this.shadeoff[1];
//Uncomment that line if you have shadow.gif, otherwise, massive slowdown.
changeimgvis 0,0;
sleep .05;
}
hideimg 0;
this.jumping=0;
}
use golrupee.gif or something similar