hmmm something like:
NPC Code:
if(playertouchsme){
toweapons Soutparkwalking;
}
if(weaponfired){
if(this.active=1){
this.active=0;
enabledefmovement;
}
else {
disabledefmovement;
this.speed = .5; //Can be changed
this.active=1;
timeout=.05;
}
}
if(timeout){
setani sp_walk,;
for(this.i=0;this.i<4;this.i++){
if(keydown(this.i)){
playerdir=this.i;
for(this.m=0;this.m < this.speed;this.m+=.05){
if(!onwall(playerx+1.5+vecx(playerdir)*1.05,player y+2+vecy(playerdir)*1.05)){
playerx+=vecx(playerdir)*.05;
playery+=vecy(playerdir)*.05;
}
}
}
}
if(this.active==1){timeout=.05;}
}
could work, not tested ^_^