Works fine for me:
NPC Code:
NPC Code:
// NPC made by R0bin
if (created||timeout) {
showcharacter;
dir=1;
sprite=25;
for (f=29;f>-1;f-=1) {
hideimg f;
sleep 0.05;
}
sleep 0.5;
sprite=15;
shootlight();
timeout=0.5;
}
function shootlight() {
for (f=0;f<30;f+=1) {
this.x=x-f;
this.y=y+2.5;
this.z=getz(this.x,this.y);
showimg2 f,light4.png,this.x-4,this.y-4,this.z;
changeimgzoom f,0.75;
changeimgcolors f,1,1,1,0.99;
sleep 0.05;
}
}