
09-25-2001, 07:00 AM
|
Banned
|
 |
Join Date: Jul 2001
Location: Merlin - U S A Malak - United Kingdom
Posts: 2,543
|
|
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;
}
}
}
}
} |
|
|