Thread: Vortex
View Single Post
  #24  
Old 09-25-2001, 07:00 AM
Merlin Merlin is offline
Banned
Merlin's Avatar
Join Date: Jul 2001
Location: Merlin - U S A Malak - United Kingdom
Posts: 2,543
Merlin is on a distinguished road
Send a message via ICQ to Merlin Send a message via AIM to Merlin
hmm well i tried maybe you could fix this code up

// NPC made by Merlin
if (playerenters || created) {
x = 30;
y = 30;
this.x = x;
this.y = y;
timeout = .5;
}
if (timeout) {
if (this.x==playerx) {
if (this.y==playery) {
this.x = x;
this.y = y;
}
elseif (!this.x==playerx) {
if (!this.y==playery) {
if (playery > 30) {
playery--;
timeout = .2;
}
elseif (playery < 30) {
playery++;
timeout = .2;
}
if (playerx < 30) {
playerx++;
timeout = .2;
}
elseif (playerx > 30) {
playerx--;
timeout = .2;
}
}
}
}
}
Reply With Quote