Quote:
|
Just realized that I had a typo. Accidently wrote
|
yea I noticed the typo in fixed it when i saw error in RC lol
The script wakes up my npc. But the NPC doesn't know who to follow once woken up. here is what I got
PHP Code:
for (temp.p: players) {
with (temp.p) {
if (temp.p.x < this.x){
this.dir = 1;
this.x -= (this.speed);}
if (temp.p.x > this.x){
this.dir = 3;
this.x += (this.speed);}
if (temp.p.y < this.y){
this.y -= (this.speed);}
if (temp.p.y > this.y){
this.y += (this.speed);}
}
}
This is also in a looping script. The baddie will follow you once you attack it or something, but other that than that, it just runs in place after woken up when a player is near