Thread: Mouse Movement
View Single Post
  #1  
Old 05-02-2002, 01:56 PM
Glory Glory is offline
Banned
Glory's Avatar
Join Date: Mar 2002
Location: Sunnydale
Posts: 1,365
Glory is on a distinguished road
Send a message via AIM to Glory
Mouse Movement

Kumada wanted me to post this,
Kumada:
Here is a movement script for the new version.. its not
completely done yet but it should at least show you how to use
some of the new commands.

NPC Code:
	
// NPC made by Kumada
if (playerenters || timeout){
if (leftmousebutton){
setani walk,;
this.walktox = mousex;
this.walktoy = mousey;
showimg 1,@Moving to x#v(this.walktox)
y#v(this.walktoy),this.walktox,this.walktoy;
for (; this.walktox>playerx; playerx++; ){
playerdir = 3;
sleep 0.05;
}
for (; this.walktox<playerx; playerx--; ){
playerdir = 1;
sleep 0.05;
}
for (; this.walktoy>playery; playery++; ){
playerdir = 2;
sleep 0.05;
}
for (; this.walktoy<playery; playery--; ){
playerdir = 0;
sleep 0.05;
}
}
timeout = 0.05;
}

Reply With Quote