Thread: canwarp2
View Single Post
  #1  
Old 09-29-2002, 04:32 AM
R0b1n-NPC R0b1n-NPC is offline
Registered User
Join Date: Sep 2002
Posts: 397
R0b1n-NPC is on a distinguished road
canwarp2

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)
__________________
- R0bin