
09-26-2001, 04:01 AM
|
Registered User
|
 |
Join Date: Mar 2001
Posts: 825
|
|
~AlphaFlame~
You mean something like this?
if (playerenters) {
timeout=.05;
}
if (timeout) {
playerdir=playerdir+1%3;
this.ag = arctan((playery-y)/(playerx-x));
this.x = playerx-cos(this.ag)*.15*(x>playerx? -1 : 1);
this.y = playery-sin(this.ag)*.15*(x>playerx? -1 : 1);
playerx=this.x;
playery=this.y;
timeout=.05;
}
P.S - Yes, the trig was lifted from Kyle's FollowPlayer script... Don't kill me x.x |
__________________
If the post says ~AlphaFlame~, that's who's posting. If not, it's Entravial (owner)
|
|
|