Thread: Possible?
View Single Post
  #8  
Old 05-18-2002, 11:06 AM
Dustey4Ever Dustey4Ever is offline
Registered User
Join Date: Apr 2002
Posts: 348
Dustey4Ever is on a distinguished road
Send a message via AIM to Dustey4Ever
Quote:
Originally posted by nyghtGT
its probably laggy and not very good but try this sucka:

NPC Code:

NPC Code:

if (created) {
timeout=1;
}
if (timeout) {
this.oldx=this.newx;
this.oldy=this.newy;
this.newx=playerx;
this.newy=playery;
if ((this.newx==this.oldx)&&(this.newy==this.old)) {
message Player Did Not Move!;
}
timeout=1;
}




thats just a little bit, but toy with it ...
umm that wouldnt work I dont think because it set the oldx and y before it messages anything or does anything, so it would always stay player did no move if im not mistaken, heres how i would do this
NPC Code:

if (playereneters) {
timeout=1;
}
if (timeout) {
if ((playerx==this.playeroldx)&&(playery==this.player oldy)) {
this.idletime++;
message Idle for #v(this.idletime);
}
if ((!playerx==this.playeroldx)||(!playery==this.play eroldy)) {
this.idletime=0;
message;
}
this.oldx=playerx;
this.oldy=playery;
timeout=1;
}



would this work?
__________________
Dustey, Rob Getashu, Van?
Van- I use this acct because mine dun work.....
Rob- Same

Last edited by Dustey4Ever; 05-18-2002 at 11:25 AM..
Reply With Quote