View Single Post
  #11  
Old 06-23-2001, 06:29 PM
Yakuna2001 Yakuna2001 is offline
Registered User
Yakuna2001's Avatar
Join Date: Jun 2001
Location: England U.K
Posts: 940
Yakuna2001 is on a distinguished road
Send a message via AIM to Yakuna2001
Quote:
Originally posted by grim_squeaker_x
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.
hmm, it seems you know your stuff lady midnight.
im impressed with your scripting skills
__________________

-Manager of the UnholyNation PlayerWorld-
UnholyNation Forums
Reply With Quote