View Single Post
  #6  
Old 01-27-2002, 04:37 AM
BocoC BocoC is offline
Registered User
BocoC's Avatar
Join Date: Jun 2001
Location: Washington State, USA
Posts: 980
BocoC is on a distinguished road
Send a message via AIM to BocoC Send a message via Yahoo to BocoC
Try something like this:
NPC Code:

if (created) timeout=0.05;
if (timeout) {
if ((abs(this.px-playerx)>0.6)||(abs(this.py-playery)>0.6)) {
playerx=this.px;
playery=this.py;
}
this.px=playerx;
this.py=playery;
timeout=0.05;
}


That should work. Since a player moves a max of 0.6 tiles every 0.5 seconds (level 3 shield), it checks if a player goes faster. You can modify upon it if you want.
__________________
-Boco

FLKJH$TRFG*$(&%>FMG >REN<>F ;.kjsd
Reply With Quote