View Single Post
  #10  
Old 06-23-2001, 05:55 PM
grim_squeaker_x grim_squeaker_x is offline
Retired Oldbie
grim_squeaker_x's Avatar
Join Date: Mar 2001
Posts: 3,084
grim_squeaker_x will become famous soon enough
Or if you want the NPC to move on player position dependance and some other things:
NPC Code:
if (created) {
this.x=x;
this.y=y;
this.enterx=32;
this.entery=32;
}
if (playerenters||timeout) {
if (isleader) {
this.xdif=(playerx-this.enterx)+playerx;
this.ydif=(playery-this.entery)+playery;
}
x=this.x+this.xdif;
y=this.y+this.ydif;
timeout=0.05;
timereverywhere;
}


And I probably made some really stupid mistakes in the above script.
__________________

Reply With Quote