ok here is my script:
NPC Code:
// NPC Made by R0bin
if (created) {
showcharacter;
setstring this.bird,2;
setcharani nickpet_walk#s(this.bird),;
this.speed = 0.2;
canwarp2;
move();
}
function move() {
this.dircounter++;
if (this.dircounter>100) {
this.dircounter=0;
this.rando1=int(random(0,2));
dir = (dir+1+this.rando1*2)%4;
}
x=x+vecx(dir)*this.speed;
y=y+vecy(dir)*this.speed;
sleep 0.1;
move();
}
and here is my problem:
When the bird gets to the edge of the level, it just stays there and does nothing. why?
(yes the map is set properly)