Thread: Custom NPC
View Single Post
  #23  
Old 01-26-2002, 03:46 AM
lordhelmut lordhelmut is offline
Registered User
lordhelmut's Avatar
Join Date: Aug 2001
Posts: 710
lordhelmut is on a distinguished road
Send a message via ICQ to lordhelmut Send a message via AIM to lordhelmut Send a message via Yahoo to lordhelmut
// NPC made by Lord Helmut
//widthofsprites=91
//heightofsprites=105
if(created){
this.xpos=x;
this.ypos=y;
this.hearts=20;
this.speed=1;
this.dir=0;
this.sprite=0;
setimgpart #f,91*2,0,91,105;
}
if(playersays(hi)){
timeout=.05;
}
if (timeout){
if (this.xpos>playerx){this.xpos-=this.speed};
if (this.ypos<playery){this.ypos+=this.speed};
if (this.xpos<playerx){this.xpos+=this.speed};
if (this.ypos>playery){this.ypos-=this.speed};
timeout=.05;
}

I did this so far but the character wont move =(
Reply With Quote